+ Reply to Thread
Results 1 to 4 of 4

Rename a workbook and save to another location

  1. #1
    Registered User
    Join Date
    08-27-2007
    Posts
    11

    Rename a workbook and save to another location

    I've selected a cell from another sheet, now i want to select an already open workbook using this value

    I have this code

    Please Login or Register  to view this content.
    With the problem bit in Red. What do i need to change this to, to get to work.
    Note that there is another part to this that selects the vairable that i have not included


    Thanks for your help
    Last edited by VBA Noob; 01-13-2008 at 07:36 PM.

  2. #2
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,230
    What is the current name of the workbook that you want to save?

    This will save it under a new name
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    08-27-2007
    Posts
    11
    I want to save the workbook as the same name it already is but in a different location.

    I am doing this for quite a few workbooks as well as saving them in another location i am also doing some other stuff on them.

    I am working from a list in another workbook which has the workbook names and using it as a variable to identify and activate the already open workbook

    cheers

  4. #4
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,230
    You don't need to activate a workbook to save. In my example, you could replacing newName with currentName will save the file to the new location (defined by sPath) with the currentName. (Since you are using variables, the quote marks should be removed.)

+ 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