+ Reply to Thread
Results 1 to 2 of 2

VBA code to select worksheets regardless their name

  1. #1
    Registered User
    Join Date
    06-06-2013
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2010
    Posts
    1

    VBA code to select worksheets regardless their name

    i need to go from a worksheet to another, regarless their name. I already have a VBA code to split my data into worksheets, but everytime they have a different name since the information from the database is always different. I read somenthing about the "sheet system name" but i don't understand it completetly. :D

    please help!

    thanks in advance!

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA code to select worksheets regardless their name

    You have to able to tell the code which sheet you are referring to somehow. One way is by the sheets name, another is by the sheets index number which is the order in which the sheet is tabbed. For example Sheets(1) would be the first sheet or sheet1 by default. Sheets(2) would be the second sheet or sheet2 by default. The last way, which is a little more trickey, would be to run a loop through all sheets and then check for a certain perameter in only the sheets you want. You would do it like this

    Please Login or Register  to view this content.

+ 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