Save As Dialog

A

Arne

maybe something like this is of help: in the event
Workbook_BeforeSave (in the 'module' MS Excel
Objects>ThisWorkbook)

Private Sub Workbook_BeforeSave(ByVal SaveAsUi As Boolean,
Cancel As Boolean)


Dim NewFileName as Sring

'Avoid the event from being fired by its own contents
Application.EnableEvents = False

'Suppose cell A1 contains the desired file name
NewFileName= Cells("A1").Text

' Arguments: document_text, type_num, prot_pwd, backup,
' write_res_pwd, read_only_rec
Application.Dialogs(xlDialogSaveAs).Show NewFileName, _
1, "", False, "", False

'Re-enable events or you'll be in trouble later
Application.EnableEvents = True

Cancel= True

End Sub

HTH, Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top