+ Reply to Thread
Results 1 to 6 of 6

Delete the same rows on multiple sheets

  1. #1
    Registered User
    Join Date
    10-22-2007
    Posts
    7

    Delete the same rows on multiple sheets

    Hi to all.

    Is it possible to delete the same rows on multiple sheets even when the sheet names have changed and will change annually. A macro seems to be specific and only works if the sheet names remain the same.
    Thanks in advance for the response.

    Allan

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You don't need a macro to do this. Group the sheets by selecting them with Ctrl clicked. Then delete the rows on the visible sheet, the same rows on all sheets will be deleted.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    10-22-2007
    Posts
    7
    thanks for the response, but not really what i am looking for. i am looking for some automation from a button, also i may be in the wrong section for asking, if so please let me know.
    Allan

  4. #4
    Registered User
    Join Date
    06-12-2008
    Location
    Newbury
    MS-Off Ver
    Office 365 ProPlus
    Posts
    92
    You can do it something like this

    Please Login or Register  to view this content.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You need to use the sheet's code name that cannot change. If you look in the Properties section of the VB EDitor you will see the shet objects listed like
    Sheet1(Sheet1) etc. The name in brackets will change when the tab is renamed, eg Sheet1(MySheet). So code like
    Please Login or Register  to view this content.
    will fail when the sheet is renamed.

    Please Login or Register  to view this content.
    will work whatever the tab is named.

  6. #6
    Registered User
    Join Date
    10-22-2007
    Posts
    7
    Sorry for delay,

    thanks, it is working

    until next time ) cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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