+ Reply to Thread
Results 1 to 2 of 2

Code to reference variable named workbook?

  1. #1
    Registered User
    Join Date
    01-16-2009
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    56

    Code to reference variable named workbook?

    I need to help several "non-Excel" people update workbooks that they use on a regular basis. I want to create code that lives in a workbook called "Fix Year Macro.xls". I plan to send all of the users this workbook/macro, so that they can run it on their individual workbooks. Obviously, all of their workbooks will have different names.

    Part of the update includes copying data from the "Fix Year Macro.xls" workbook into the users' variably named workbooks. What code is necessary to add in order for the macro to reference the variably named workbooks? Kind of hard to explain...hope I'm being clear. Thanks!

    I would post my code, but I don't have much so far...this is kind of my starting point.

    Andrea

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Code to reference variable named workbook?

    you could use application.getopenfilename, multiselect = true and load these into a listbox (incese files come from another folder path) and loop the listbox.

    Or do have it multiselect and work with one file at a 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