Artisez
Member
I added a command button to a spreadsheet to save the sheet using certain cells for the save name and to save to a specific folder. I first get a compatibility notice, when I click continue I get a recalculate popup. When I click yes I then get the run time error. At the moment nothing I do will get rid of the compatibility issues. If I remove the command button and remove the code I get no issues. Put the button and code back and the issue is back.
Any help would be appreciated. Just trying to get rid of the compatibility issues and one click save my spreadsheet. Thanks.
Code:
Private Sub CommandButton2_Click()
Dim Path As String
Dim FileName1 As String
Dim FileName2 As String
Path = "Y:\TLF\TLW Saves\"
FileName1 = Range("B52")
FileName2 = Range("B50")
ActiveWorkbook.SaveAs Filename:=Path & FileName1 & "-" & FileName2 & ".xlsm", FileFormat:=xlNormal
End Sub
Any help would be appreciated. Just trying to get rid of the compatibility issues and one click save my spreadsheet. Thanks.