I want users to save a workbook as a macro enabled file by using this code:
However, I am getting a 'Variable Not Defined' compile error. I have no idea, how to correct this. Can't find anything sensible that could help me.
Any advice appreciated.
Code:
Sub StartFunctional ()
Dim FileSaveName As Variant
Dim xFileName As String
If SaveAsUI <> False Then
Cancel = True
xFileName = Application.GetSaveAsFilename(, "Excel Macro-Enabled Workbook (*.xlsm), *.xlsm", , "Save As xlsm file")
End If
Application.FileDialog(msoFileDialogSaveAs).Show
End Sub
However, I am getting a 'Variable Not Defined' compile error. I have no idea, how to correct this. Can't find anything sensible that could help me.
Any advice appreciated.