+ Reply to Thread
Results 1 to 8 of 8

Delete button to remove data from multiple sheets at the same time - Any Thoughts???

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    Hello Everyone..

    Hopefully there is a solution for this... I have two sheets that are identical - One is for Current Data and the second is for Annual Data.... I have a delete button to remove a row (record) from the Current sheet named EmployeeData , but need it to also remove the same record from the second sheet called AnnualReview_Data... Below is the delete button code that removes the record from the sheet...

    Please Login or Register  to view this content.
    Any Thoughts would be appreciated...

    Best Regards

    John
    Last edited by JJFletcher; 07-22-2016 at 07:06 PM. Reason: grammer

  2. #2
    Registered User
    Join Date
    07-22-2016
    Location
    Flagstaff, Arizona
    MS-Off Ver
    2010
    Posts
    9

    Re: Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    I'm super new to VBA, so this probably won't work. What if you replaced the "Set ws" command to = Sheets(Array("AnnualReview_Data", "EmployeeData"))

  3. #3
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    Hi Snick -

    When adding that to the code I get an error: "Type Mismatch"

    Best Regards,

    John

  4. #4
    Registered User
    Join Date
    07-22-2016
    Location
    Flagstaff, Arizona
    MS-Off Ver
    2010
    Posts
    9

    Re: Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    I thought that would be too easy. I just recorded the action of grouping two sheets together and look at what the VBA came out as. Hopefully someone has a solution.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    Try change to
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    Hi JIndon,

    when trying to apply that suggestion I get the following error:

    Compile Error: For without Next

    John

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    Strange.
    Just tested and it compiles here.

    By the way, is "lstMyData" a global variable?

  8. #8
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    991

    Re: Delete button to remove data from multiple sheets at the same time - Any Thoughts???

    Hi Jindon,

    It works - I must have missed something in the translation - Thanks so much !

    "lstMyData" a global variable? is a global

    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Simple Protecting All Sheets VBA only Protects One Sheet... Thoughts?
    By MrBill in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-09-2016, 05:00 PM
  2. Macro Button to Add/Delete rows across multiple sheets.
    By BluOx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2014, 03:32 PM
  3. [SOLVED] remove database by command instead of clicking delete button
    By dharmang1910 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-30-2013, 01:19 PM
  4. Find data, delete row, copy in new data - multiple sheets
    By gmn734 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-22-2013, 08:49 AM
  5. Selection of cells in multiple sheets and delete the data in them
    By kolovel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2011, 06:17 AM
  6. remove columns with specific data in multiple sheets
    By tanakwagu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-29-2010, 07:29 AM
  7. Delete button to remove cell value from Listbox
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-16-2009, 07:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1