Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Save As macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
robs3131 - 25 Feb 2008 00:48 GMT
Hi all,

I've taken a macro that someone else created and modified it slightly - the
macro essentially brings up the "Save As" dialogue box (this is needed as
part of a larger macro).  The macro works fine, the only thing being that now
when I go to the "Open" menu, there are the following two choices for Excel
files:

- Microsoft Office Excel Files
- All Microsoft Office Excel Files

Is there something I can change in the macro so that there is only one
choice when I to "Open"?  Thanks for your help.

Code:

Private Sub cmdarchive_Click()

Dim intlen As Integer
Dim strnamewlen As String

Application.DisplayAlerts = False

' Save file name and path into a variable
   
   intlen = Len(ActiveWorkbook.Name)
   strnamewlen = Left(ActiveWorkbook.Name, intlen - 4)
   template_file = strnamewlen
   
   fileSaveName = Application.GetSaveAsFilename( _
   InitialFileName:="C:\temp\" + template_file + " " +
VBA.Strings.Format(Now, "mm-dd-yyyy") + ".xls", _
   fileFilter:="Excel Files (*.xls), *.xls")
   
   If fileSaveName = False Then
       Exit Sub
   End If

   ActiveWorkbook.SaveAs Filename:= _
       fileSaveName, FileFormat:=xlNormal, _
       CreateBackup:=False
   
    Application.DisplayAlerts = True

End Sub

Signature

Robert

JLGWhiz - 25 Feb 2008 02:20 GMT
When you see the display with the two choices, if there is a drop down arrow
to the right, try clicking it and see if it goes back to one choice.

> Hi all,
>
[quoted text clipped - 41 lines]
>
> End Sub
robs3131 - 04 Mar 2008 00:36 GMT
I just tried - there is no drop down arrow to the right.  

Signature

Robert

> When you see the display with the two choices, if there is a drop down arrow
> to the right, try clicking it and see if it goes back to one choice.
[quoted text clipped - 44 lines]
> >
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.