+ Reply to Thread
Results 1 to 6 of 6

Dynamic Worksheet Names

  1. #1
    Registered User
    Join Date
    09-18-2008
    Location
    Bangkok
    Posts
    3

    Dynamic Worksheet Names

    I get daily reports that always bear the same name. Until I open them, that is. At that point, both file&sheet get a sequential number. I run macros on these sheets, so the dynamic names get in my way. Does anyone know how to either
    a) eliminate the numbering, or
    b) get macros to perform on dynamic worksheet names?
    Cheers beat
    Last edited by beattheswiss; 09-19-2008 at 07:41 AM. Reason: typos

  2. #2
    Registered User
    Join Date
    07-18-2008
    Location
    India
    Posts
    68

    Dynamic Worksheet Names

    Hi,

    Can we use the index number property for worksheets ?

    e.g.

    Please Login or Register  to view this content.
    the above code will show the index numbers no matter what is the name of the sheet.

  3. #3
    Registered User
    Join Date
    09-18-2008
    Location
    Bangkok
    Posts
    3
    Thanx Rubeus! I tried to run this macro on various worksheets and received messages like the attached one. Sorry, but I'm not getting it...
    Can you explain me a little more about this code please?
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    He just wrote a sample set to demonstrate how excel stores worksheet names. In his case, he showed that the index of a worksheet is one. That means it is the first worksheets sequentially in your workbook.

    So, in excel vba, you can use the various methods to reference a sheet.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    If you need more directed responses, we'd need to see a copy of the workbook.

  5. #5
    Forum Contributor
    Join Date
    03-25-2008
    MS-Off Ver
    Excel, Outlook, Word 2007/2003
    Posts
    245
    Rewrite your code by using
    Please Login or Register  to view this content.
    .

    Charlize

  6. #6
    Registered User
    Join Date
    09-18-2008
    Location
    Bangkok
    Posts
    3
    Dudes, this is excellent - my problem is fixxxed!! Thanx ever so much!

+ 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. Matching/Adding
    By Bullfn33 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 09-14-2011, 11:27 PM
  2. How to declare variable names depending on worksheet names
    By Dynelor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2008, 08:43 AM
  3. Worksheet names as variables
    By JeffreyFong in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-14-2007, 12:47 AM
  4. Reffering to Sheet names in a worksheet cells
    By Zyphon in forum Excel General
    Replies: 6
    Last Post: 04-02-2007, 05:58 PM
  5. Importing Names from another worksheet
    By oldtimer26 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-03-2006, 07:05 PM

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