+ Reply to Thread
Results 1 to 3 of 3

Saving a File with specific file name using Macro

  1. #1
    Registered User
    Join Date
    10-18-2007
    Posts
    6

    Saving a File with specific file name using Macro

    I am trying to save my workbook in a specific directory with a specific filename and to incorporate a date field from within the spreadsheet.

    I have changed the format of the cell so it does not include / as i know this would not work.

    Any ideas how i go about doing this. Getting frustrated now!

    Saving it is the easy part but adding in the field from the spreadsheet is where im falling over.
    Last edited by LstarS; 02-19-2009 at 06:14 AM.

  2. #2
    Registered User
    Join Date
    10-31-2007
    Posts
    34

    Re: Saving a File with specific file name using Macro

    Formatting the date value inside XL to get rid of the "/" would not solve the issue. You need the VBA format function to append the date to the new file name you wish to save and leave the date value unchanged.

    For example, the following code saves the workbook under a specific directory and with a specific name and append a date value from cell A1 in the active worksheet:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-18-2007
    Posts
    6

    Re: Saving a File with specific file name using Macro

    Thanks that solved it. I was falling over on the format of the date.

+ 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