Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    102

    Unanswered: Prompting for Save location In Macro

    In a Macro,
    how would one prompt the user for a filename for saving ?
    meaning, how would you simulate the action of selecting "Save As" ?

    Also would it be possible to add VB code to the macro ?

    For example, I want the input on a sheet to be a date; would it be possible to make a pop-up calendar form and have it working in Excel ?

    thanks.

    C

  2. #2
    Join Date
    Dec 2003
    Location
    San Diego, CA
    Posts
    153
    Use this for promting with the Save As dialog box: Application.Dialogs(xlDialogSaveAs).Show

    Here's one way to creat a calendar: http://support.microsoft.com/default...&Product=xlw2K

    Hope that helps,

    Smitty

  3. #3
    Join Date
    Sep 2003
    Posts
    102

    thx

    thx alot...
    it should help out...

    also, do u know the function that returns a boolean stating whether there is an existing file ?


    i've been looking for it but i can't rembmer the name.
    thx

  4. #4
    Join Date
    Oct 2003
    Posts
    1,091
    Is this what you need?

    Code:
    Private Function FileExists(fname) As Boolean
       FileExists = (Dir(fname) <> "")
    End Function
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  5. #5
    Join Date
    Sep 2003
    Posts
    102
    thx,

    Dir
    was the function i was looking for..

    Also, for the calendar thing,
    i was looking for more something like a popup button based calendar;
    where u can select a day and it will automatically return that day.

    Rite now, i have a cell where I manually enter the date (eg. 1/29/2004).
    I'd like to have a calendar pop up and then i can select a day and it will automaticlly populate that cell with the date.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •