I have a quote program that i have put together with a lot of help from asking questions on these forums. I have a save as button on my sheet and would like to automatically save a backup .xlms file to a specific folder on my desktop. I would like to have it save the file name from 2 seperate fields in one workbook. Example: Customer Name & Job Name. The other issue is that it takes me to an excel filer first before taking me to the option of entering the file name and creating a backup .xlms file. Can someone look at this code and tell me what I need to do? I have been teaching myself VBA programming for the last 3 months and I am still not fluent in this language. Anything will help!
ElseIf Application.Caller = "SaveAsExcelButton" Then
Dim Fname As String
MsgBox "Where would you like to save the Excel Backup of this Quote", vbOKOnly + vbExclamation, "Backup Quote"
Fname = Application.GetSaveAsFilename("", _
FileFilter:="Excel Filer (*.xlsm), *.xlsm", _
Title:="Save Quote Backup")
If Application.Dialogs(xlDialogSaveAs).Show(, , vbNullString) Then
MsgBox "Your Excel File Has Been Saved", vbExclamation, "Backup Quote"
Else
MsgBox "YOU DID NOT SAVE A BACKUP!!", vbOKOnly + vbCritical, "Try Again"
End If
Bookmarks