+ Reply to Thread
Results 1 to 3 of 3

Assign the name of the workbook to a variable?

  1. #1
    Registered User
    Join Date
    10-22-2008
    Location
    Sunrise Beach
    Posts
    3

    Assign the name of the workbook to a variable?

    I need to find a way to always re-select the 'original workbook' after having selected and activated other workbooks / documents.

    The name of my 'original workbook' changes everytime, so I thought I might be able to work around it by assigning the name of that original workbook to a variable.

    Any help much appreciated

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How are you going to determine the "original workbook"?

    If it is the workbook that contains the macro, then you can use
    Please Login or Register  to view this content.
    . If not, then you need to have some way to determine which workbook you want to use.

    rylo

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064
    It is almost never necessary to actually select or activate other workbooks in code, but the simple way to do what you want I think is to use a workbook variable:
    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