I have this code attached to a button to rename and save the file where the user likes but the issue is that the file doesn't end up actually saving.
Here is the code below:
Private Sub CommandButton1_Click()
Dim IntialName As String
Dim fileSaveName As Variant
Dim equipment As Range
Dim employee As Range
Dim ws As Worksheet
Set ws = Worksheets("Fillable")
Set equipment = ws.Range("C9")
Set employee = ws.Range("G11")
InitialName = equipment & "_" & employee & "_Report"
fileSaveName = Application.GetSaveAsFilename(InitialFileName:=InitialName, _
fileFilter:="Excel Files (*.xls), *.xlsm")
If fileSaveName <> False Then
MsgBox "Save as " & fileSaveName
End If
End Sub
Any help is appreciated!!!
Here is the code below:
Private Sub CommandButton1_Click()
Dim IntialName As String
Dim fileSaveName As Variant
Dim equipment As Range
Dim employee As Range
Dim ws As Worksheet
Set ws = Worksheets("Fillable")
Set equipment = ws.Range("C9")
Set employee = ws.Range("G11")
InitialName = equipment & "_" & employee & "_Report"
fileSaveName = Application.GetSaveAsFilename(InitialFileName:=InitialName, _
fileFilter:="Excel Files (*.xls), *.xlsm")
If fileSaveName <> False Then
MsgBox "Save as " & fileSaveName
End If
End Sub
Any help is appreciated!!!