samuelwright
12-09-2005, 04:56 AM
Hi
In Word, I have a userform with a button that opens the Save as dialog box using the following code:
'Path is a string (Activedocument.path) and FileName is also a string that
'gets put into the File Name box using .Name
With Application.Dialogs(wdDialogFileSaveAs)
.Name = Path & Trim(FileName) & ".doc"
.Show
End With
However, when I try the same in Excel, it doesnt put the name into the file save box...in fact it gives an error. what is the difference and how can I make it work?
With Application.Dialogs(xlDialogSaveAs)
.Name = Path & Trim(FileName) & ".xls"
.Show
:dunno
In Word, I have a userform with a button that opens the Save as dialog box using the following code:
'Path is a string (Activedocument.path) and FileName is also a string that
'gets put into the File Name box using .Name
With Application.Dialogs(wdDialogFileSaveAs)
.Name = Path & Trim(FileName) & ".doc"
.Show
End With
However, when I try the same in Excel, it doesnt put the name into the file save box...in fact it gives an error. what is the difference and how can I make it work?
With Application.Dialogs(xlDialogSaveAs)
.Name = Path & Trim(FileName) & ".xls"
.Show
:dunno