+ Reply to Thread
Results 1 to 4 of 4

Save as Macro

  1. #1
    Registered User
    Join Date
    07-27-2007
    Posts
    36

    Save as Macro

    Hi all,

    I have created an invoice which is given to staff to use, but I want them to save the document with a specific file name. The specific name that I want them to use is in a cell (eg D1). I dont mind where they save their invoice as they will email it on, so they can get paid.

    So effectively would like the save as box to come up with the file name already chosen and they would then choose the location.

    Does this make any sense?

    Clint

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481
    Hi there,

    Insert the following VBA code into the "ThisWorkbook" VBA module of your workbook:

    Please Login or Register  to view this content.
    The cell containing the name under which the workbook will be saved is specified in the statement:
    Please Login or Register  to view this content.
    Obviously this can be changed to suit your requirements.

    Hope this helps - please let me know how you get on.

    Best regards,

    Greg M

  3. #3
    Registered User
    Join Date
    07-27-2007
    Posts
    36

    SaveAs Works a treat

    Thank you so much Greg, that is exactly what I was after with the SaveAs. When I had tried other methods, it would go into Debug if you chose 'cancel' or 'no' if the File already existed.

    As for the date thing, I have added:

    Cells(14, 13).Value = Cells(14, 13).Value
    (Courtesy of Roy from another forum)

    This works perfect for me, as I put the 'TODAY() to text' just before it saves.

    Thank you so much for your help.

    DeeLaa77

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481
    Hi again DeeLaa,

    Many thanks for the feedback. You're welcome - delighted to have helped.

    All the best,

    Greg M

+ 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