+ Reply to Thread
Results 1 to 2 of 2

Activeworkbook.saveas question

  1. #1
    Registered User
    Join Date
    03-08-2008
    Location
    Rhode Island
    MS-Off Ver
    2007
    Posts
    25

    Activeworkbook.saveas question

    Hello,

    I have a new product form with 2 save as buttons on it. One is to save as a draft copy and one is to save as a final copy. I'd like to have the activeworkbook.saveas command save a copy where the filename is 2 strings joined together, one string would come from the product name cell and the other would be "draft" or "final". The filename would be something like ProductZFinal.xlsm

    Thanks very much for any help

  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
    Quote Originally Posted by MGT2000
    Hello,

    I have a new product form with 2 save as buttons on it. One is to save as a draft copy and one is to save as a final copy. I'd like to have the activeworkbook.saveas command save a copy where the filename is 2 strings joined together, one string would come from the product name cell and the other would be "draft" or "final". The filename would be something like ProductZFinal.xlsm

    Thanks very much for any help
    Hi,

    Just declare a variable for the filename and set the value by concatenating the product name cell and whatever else you want. So for ex. if the Product name 'ProductZ' is in cell A1, use the following in your code

    Please Login or Register  to view this content.
    If you want to vary the 'Final/Draft' choice then you could build in an IF..THEN test, or a CASE SELECT statement and set the stFileName variable as appropriate.

    HTH

+ 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