+ Reply to Thread
Results 1 to 5 of 5

Saving and Opening New Workbooks with Macros

  1. #1
    Registered User
    Join Date
    10-26-2008
    Location
    Fl, USA
    Posts
    3

    Saving and Opening New Workbooks with Macros

    I am creating a program in excel and can not figure how to save it under a new name and reopen it and be able to use the macros without having to change the workbook name the in macros? Any simple ideas? I am not to advanced in programming excel and I am working in 2007.
    Thanks!!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi and welcome to the forum.

    You probably don't need to use a specific hardcodes name. You could just use the instruction

    Please Login or Register  to view this content.
    wherever you currently have the name coded

    Alternatively you could create a variable for the workbook name, and use that in the macro.

    e.g.

    Please Login or Register  to view this content.
    HTH

  3. #3
    Registered User
    Join Date
    10-26-2008
    Location
    Fl, USA
    Posts
    3
    Thank you very much. I have links to other excel files outside of my workbook does this make a difference?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    It all depends how you're using or accessing them.

    Your OP dealt with handling the current workbook name if you saved it with other names. Are you now asking how you can refer to other workbook names in your code, after you have changed their names?

    Rgds

  5. #5
    Registered User
    Join Date
    10-26-2008
    Location
    Fl, USA
    Posts
    3
    I have three seperate workbooks. They are all saved under different names and are referred to in different macros from my project workbook. I want to replicate the workbooks under a new names and have the macros work. Sorry if I confused anyone.
    Last edited by Footeball13; 10-26-2008 at 09:12 PM.

+ 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