LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Saving a Workbook cause's Error's

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
saving 3 worksheets in a workbook to a separte workbook bigjim Excel Programming 6 November 5th 08 10:12 PM
Color Changes When Saving 2007 Workbook as 97 - 2003 Workbook Don Excel Discussion (Misc queries) 0 April 20th 08 04:51 AM
Saving a sheet in a workbook as .csv but not changing workbook name gloryofbach[_4_] Excel Programming 3 October 30th 05 08:50 PM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM
Saving workbook from vba Don[_12_] Excel Programming 1 December 10th 03 08:53 AM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"