SaveAs command doesn't save extension



I am trying to pull a SaveAs dialog box from a VB command that will
prompt the user to save their work. The problem is when the user
types in the filename it does not save as an excel file. The user
would have to type the extension themselves and that is not feasible
for this application. Below is the code I got from VB Help. Is there
another way?


sub savenew()
Set NewBook = Workbooks.Add
Do
fName = Application.GetSaveAsFilename
Loop Until fName <> False
NewBook.SaveAs Filename:=fName
end sub

.



Relevant Pages

  • [TOOL] ComLog.pl, a WIN32 Command Prompt Logger
    ... administrator to keep a history of commands typed in the DOS command ... prompt and the associated output, for example on an IIS server. ... # This program captures the input/output of the Windows NT Command Promt ... sub getcurrentdrive ...
    (Securiteam)
  • Tool to get MCP ODT at Windows CMD prompt
    ... You basically send a series of ODT commands of your choosing, once, or in a loop, and get the output right in the command ... Dim sHostname ... Sub WriteIt ... WriteIt "" ...
    (comp.sys.unisys)
  • FYI: Delete still shows the deleted record
    ... "kit" wrote: ... new SQL Server DB and I'm borrowing code from the previous SQL Server DB ... Put this in the click event of your "DELETE" command button: ... Public Sub DelCurrentRec ...
    (microsoft.public.access.forms)
  • Re: How Does One Determine If a Command Button Has Been Pressed?
    ... I create a Public variable in the module that calls the UserForm and then ... options buttons), a text box, and two command buttons. ... Private Sub CommandButton1_Click ...
    (microsoft.public.word.vba.general)
  • RE: Want to interactively run a shell script
    ... sub process_command { ... Want to interactively run a shell script ... Any opinion expressed in this e-mail is personal to the sender ...
    (perl.beginners)