B
Brian
I have a User Form with a Control Button for assigning the name & saving the
Workbook.
The Problem is when the Save As Dialog Box pops up the File name is
assigned, but you can not save as anything other than "All Files". The
different Excel file types are not even there to pick from. At that point
user hits the canel to close without saving, but it saves the file anyway as
a file named "FALSE.xlsm".
What is supposed to happen is the user clicks on the Control Button and the
Save As Dialog Box pops up with the File Name already assigned. Then the user
can go to the directory they want to save the Workbook in and save it. If not
the User Hits Cancel and the Save Dialog Box close's and the Message "The
Save Method Failed".
Here is my code. What did I do wrong? Where is it getting the name "FALSE"
form?
' Save Eng Spec 11 Control Button
Private Sub Save_Eng_Spec_11_Click()
Dim strFile As String
Dim bk As Workbook
Set bk = ActiveWorkbook
strFile = "SPEC " & TEO_No_1.Value _
& Space(1) & CLLI_Code_1.Value _
& Space(1) & CES_No_1.Value _
& Space(1) & TEO_Appx_No_2.Value
bk.SaveAs Filename:=Application.GetSaveAsFilename(strFile)
If FileToSave <> False Then
MsgBox "The Save Method Failed, Eng Spec was not Saved", , "C.E.S."
Exit Sub
End If
End Sub
Workbook.
The Problem is when the Save As Dialog Box pops up the File name is
assigned, but you can not save as anything other than "All Files". The
different Excel file types are not even there to pick from. At that point
user hits the canel to close without saving, but it saves the file anyway as
a file named "FALSE.xlsm".
What is supposed to happen is the user clicks on the Control Button and the
Save As Dialog Box pops up with the File Name already assigned. Then the user
can go to the directory they want to save the Workbook in and save it. If not
the User Hits Cancel and the Save Dialog Box close's and the Message "The
Save Method Failed".
Here is my code. What did I do wrong? Where is it getting the name "FALSE"
form?
' Save Eng Spec 11 Control Button
Private Sub Save_Eng_Spec_11_Click()
Dim strFile As String
Dim bk As Workbook
Set bk = ActiveWorkbook
strFile = "SPEC " & TEO_No_1.Value _
& Space(1) & CLLI_Code_1.Value _
& Space(1) & CES_No_1.Value _
& Space(1) & TEO_Appx_No_2.Value
bk.SaveAs Filename:=Application.GetSaveAsFilename(strFile)
If FileToSave <> False Then
MsgBox "The Save Method Failed, Eng Spec was not Saved", , "C.E.S."
Exit Sub
End If
End Sub