If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Prompting for Save location In Macro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-28-04, 14:10
ontheDB ontheDB is offline
Registered User
 
Join Date: Sep 2003
Posts: 80
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
Reply With Quote
  #2 (permalink)  
Old 01-28-04, 18:20
Smitty Smitty is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 01-29-04, 09:50
ontheDB ontheDB is offline
Registered User
 
Join Date: Sep 2003
Posts: 80
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
Reply With Quote
  #4 (permalink)  
Old 01-29-04, 09:54
shades shades is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 01-29-04, 11:18
ontheDB ontheDB is offline
Registered User
 
Join Date: Sep 2003
Posts: 80
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On