+ Reply to Thread
Results 1 to 6 of 6

Open workbooks with variables in filename using loop

  1. #1
    Registered User
    Join Date
    05-31-2011
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    3

    Open workbooks with variables in filename using loop

    I am trying to open several workbooks with variable names using a loop. All of the filenames are of the form "variable GSC 2011_04.xlsx"

    My code is below, with the problem area highlighted.

    Please Login or Register  to view this content.
    Thanks!
    Last edited by as1234; 05-31-2011 at 01:10 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Open workbooks with variables in filename using loop

    I have no idea if this will be right but try:
    Please Login or Register  to view this content.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Registered User
    Join Date
    05-31-2011
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Open workbooks with variables in filename using loop

    Sadly, no it doesn't.

    I received the error message:
    '1 GSC 2011_04.xlsx' could not be found.

    Thanks for trying though!

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Open workbooks with variables in filename using loop

    Maybe this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-31-2011
    Location
    NJ
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Open workbooks with variables in filename using loop

    It worked!!! Thank you soooo much!

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Open workbooks with variables in filename using loop

    You are most welcome.

+ 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