+ Reply to Thread
Results 1 to 2 of 2

Defining workbooks with random file names

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Manitoba
    MS-Off Ver
    Excel 2010
    Posts
    3

    Defining workbooks with random file names

    Hi,

    One of my macros stored in my PERSONAL.XLSB when run, opens an excel workbook that I use as a template and copies data back to whatever workbook I'm on at the moment. My issue is, I run this macro on random excel workbooks. Because of this, the name of the workbooks that I run this macro on are never the same. How can I define the current workbook that has the random file name/location, so that I can after copying the data from my template go back to this random workbook?

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

    Re: Defining workbooks with random file names

    Hi

    When the "random" workbook is selected, use a variable in the macro in the form of
    Please Login or Register  to view this content.
    That way, you have a reference to the workbook that you can use to either reference it, or go back to it....

    rylo

+ 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