Mrrrr
AdMiN
 Inregistrat: acum 18 ani
Postari: 2251
|
|
Source:
The code below opens a Save As dialog to save the active workbook to a specified folder and with a specified name.
Sub SaveAsDialog()
'On Error Resume Next
With Application.FileDialog(msoFileDialogSaveAs) .Title = "Please choose a location and file name to save" .ButtonName = "Save invoice" .InitialFileName = "D:\Documents\Invoices\" & Range("C5").Value If .Show = 0 Then MsgBox "The file did not save.", vbCritical Exit Sub End If Application.DisplayAlerts = False .Execute Application.DisplayAlerts = True End With
End Sub |
_______________________________________

|
|