Hi, I'm going to have a macro to save as in MacroEnabledWorkbook format. Here is my code
If I using this code, the SaveAs dialog box will appear but the format only All Files. How can I fix this? Btw my excel format before using this macro is in .txt format.
Code:
Sub trysave()
Dim kamal As Variant
kamal = Application.GetSaveAsFilename
If kamal <> False Then
ActiveWorkbook.SaveAs Filename:=kamal, FileFormat:=52
End If
End Sub
If I using this code, the SaveAs dialog box will appear but the format only All Files. How can I fix this? Btw my excel format before using this macro is in .txt format.