Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Show SaveAs dialog and suggest a file name based on a cell reference

2 views
Skip to first unread message

martin

unread,
Apr 23, 2003, 4:40:49 AM4/23/03
to

I would like to show the SaveAs dialog box and suggest a
file name based on a cell reference (C26).
I've got as far as opening the SaveAs dialog....

Sub C26SaveAs()
Application.Dialogs(xlDialogSaveAs).Show
End Sub

....any help with this would be appreciated

alan

unread,
Apr 23, 2003, 4:57:43 AM4/23/03
to
Just put a space and then the reference..

Application.Dialogs(xlDialogSaveAs).Show Range("c26").Value

>-----Original Message-----
>
>I would like to show the SaveAs dialog box and suggest a
>file name based on a cell reference (C26).
>I've got as far as opening the SaveAs dialog....
>
>Sub C26SaveAs()
>Application.Dialogs(xlDialogSaveAs).Show
>End Sub
>

>.....any help with this would be appreciated
>.
>

Tom Ogilvy

unread,
Apr 23, 2003, 7:47:14 AM4/23/03
to
You have more control with GetSaveAsFilename function.

You can use Chdir and Chdrive to set the location to save to, then provide a
default file name as an argument. The function returns what the user has
chosen - you then use Workbook.SaveAs to do the actual save (so you can test
what the user has chosen and make sure it is acceptable).

See help for details.

Regards,
Tom Ogilvy


"martin" <mart...@hotmail.com> wrote in message
news:05c301c30974$0a7d3560$a301...@phx.gbl...

Nun

unread,
Apr 23, 2003, 11:42:03 AM4/23/03
to Tom Ogilvy
Try this.

Dim SaveName As String
SaveName = ActiveSheet.Range("F5").Text
Application.Dialogs(xlDialogSaveAs).Show SaveName

0 new messages