I'm trying to make a macro that when the user presses a button, it saves the worksheet based on a specific cell value and folder. Right now I got it to work so that it saves the entire workbook into the folder but I want the user to have the option to just save the worksheet itself.
My code with saving the entire workbook.
Sub SavePTSFile()
Dim FileName As String
Dim Path As String
Application.DisplayAlerts = False
Path = "J:\Control_Center\PTS Distro Wave Files\"
FileName = Range("X3").Value & ".xlsx"
ActiveWorkbook.SaveAs Path & FileName, xlOpenXMLWorkbook
Application.DisplayAlerts = True
End Sub
My code with saving the entire workbook.
Sub SavePTSFile()
Dim FileName As String
Dim Path As String
Application.DisplayAlerts = False
Path = "J:\Control_Center\PTS Distro Wave Files\"
FileName = Range("X3").Value & ".xlsx"
ActiveWorkbook.SaveAs Path & FileName, xlOpenXMLWorkbook
Application.DisplayAlerts = True
End Sub