Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
beatrice17
Femeie
24 ani
Bucuresti
cauta Barbat
24 - 80 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Save As Dialog to Save a Workbook in Excel VBA Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2186
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


_______________________________________


pus acum 5 ani
   
Pagini: 1  

Mergi la