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
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