+ Reply to Thread
Results 1 to 2 of 2

saving file name and location with excel macro

  1. #1
    Alex Suardi
    Guest

    saving file name and location with excel macro



    how can I develop a macro in excel who allows me to automatically set
    the file name (eg. content cell B3 + content cell B5) and let me choose
    the file location?
    The best solution wuold be something like the GetSaveAsFilename method
    in which the field "Name" is automatically set.

    TheFile =
    Application.GetSaveAsFilename("N:\AFC\MURCA\FATTURAZIONE\FATTURE", _
    "Workbook (*.xls),*.xls", , "Save As...")

    Thank you for your help.
    Alex

    *** Sent via Developersdex http://www.developersdex.com ***

  2. #2
    Dave Peterson
    Guest

    Re: saving file name and location with excel macro

    So you want to allow the user to control the drive/folder, but you want to
    specify the filename?

    If yes, maybe just asking for the drive/folder would be better:

    Jim Rech has a BrowseForFolder routine at:
    http://www.oaltd.co.uk/MVP/Default.htm
    (look for BrowseForFolder)

    John Walkenbach has one at:
    http://j-walk.com/ss/excel/tips/tip29.htm

    If you and all your users are running xl2002+, take a look at VBA's help for:
    application.filedialog(msoFileDialogFolderPicker)

    Alex Suardi wrote:
    >
    > how can I develop a macro in excel who allows me to automatically set
    > the file name (eg. content cell B3 + content cell B5) and let me choose
    > the file location?
    > The best solution wuold be something like the GetSaveAsFilename method
    > in which the field "Name" is automatically set.
    >
    > TheFile =
    > Application.GetSaveAsFilename("N:\AFC\MURCA\FATTURAZIONE\FATTURE", _
    > "Workbook (*.xls),*.xls", , "Save As...")
    >
    > Thank you for your help.
    > Alex
    >
    > *** Sent via Developersdex http://www.developersdex.com ***


    --

    Dave Peterson

+ 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