Title: Save As not saving a file
Tags: excel;vba
Question: I'm trying to get the 'Save As' dialogue to prompt with the inputted information on a userform and save as a new file. Everything looks like it works and even has the saving/loading icon when I click 'save' but no actual saved file is saved in my folder. Here is my 'Save As' code:
Dim IntialName As String
Dim fileSaveName As Variant
InitialName = Range("d1") &amp; "_" &amp; Range("j1") &amp; "_" &amp; Range("p1")
fileSaveName = Application.GetSaveAsFileName(InitialFileName:=InitialName, _
fileFilter:="Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")

Here is the accepted answer: ActiveWorkbook.SaveAs fileSaveName, xlFileFormat.xlOpenXMLWorkbookMacroEnabled
after your code to actually save it.
All your code currently does is give you a string so you can save it using that name. You have to do the actual saving yourself.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:12/21/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<excel><vba>', 'Title': 'Save As not saving a file', 'ViewCount': 61, 'id': 47930845, 'user_AboutMe': None, 'user_AccountId': 10346444.0, 'user_DisplayName': 'Sid.  T.', 'user_Reputation': 93.0, 'user_Views': 20.0, 'user_id': 7631256.0}}