General discussion

Locked

Excel97 Application.Dialogs & strings

By web maxtor ·
Using Excel97, I want to use Application.Dialogs(xlDialogSaveAs).Show plus the first document_text arguement to allow a user to decide what path a file should be saved to, while suggesting a file name. The file name is a string including some text,the date, another app's user name, etc.

sTodaysDate = date formatted as MMDDYY earlier
sUserName = a user name I got earlier
sSaveFile = "PHO.QTE." & sTodaysDate & "." & sUserName
Application.Dialogs(xlDialogSaveAs).Show sSaveFile

The dialog box displays the sSaveFile string correctly in the file name box, but surrounds it with quotation marks. If I replace sSaveFile with some text, the quotes go away. How do I build the filename, and fill in the file name box, without quotation marks?

Thank you,

Ray

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Excel97 Application.Dialogs & strings

by tclere In reply to Excel97 Application.Dialo ...

Add the .xls extension to sSaveFile otherwise Excel thinks that you want to save the file with a .sUserName extension.

sFile = "PHO.QTE." & sDate & "." & sUser & ".xls"

You could also replace the .'s with some other character to avoid this problem.

Collapse -

Excel97 Application.Dialogs & strings

by web maxtor In reply to Excel97 Application.Dialo ...

Thank you.

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums