Thread
:
File/New in Excel
View Single Post
#
2
Posted to microsoft.public.excel.misc
Dave Peterson
Posts: n/a
File/New in Excel
Take a look at .savecopyas in VBA's help
If that's not what you mean, you may want to enhance your description.
Curt wrote:
stumped or can't see:
Know it must be possible. Trying to save a copy of workbook to a folder
named by user. then return to workbook and complete operation of updateing
workbook "dataentry" for next year. Any help appreciated.
Thanks Much
"Dave Peterson" wrote:
Maybe you could use a macro to display that old dialog.
You could incorporate this into an existing workbook or create a new workbook:
Option Explicit
Sub auto_open()
Dim myCtrl As CommandBarControl
Call DeleteMyNew
With Application.CommandBars("worksheet menu bar").Controls("file")
Set myCtrl = .Controls.Add(Type:=msoControlButton, befo=1, _
temporary:=True)
With myCtrl
.OnAction = ThisWorkbook.Name & "!ShowMyNewDialog"
.Caption = "MyNew"
End With
End With
End Sub
Sub ShowMyNewDialog()
Application.Dialogs(xlDialogWorkbookNew).Show
End Sub
Sub auto_close()
Call DeleteMyNew
End Sub
Sub DeleteMyNew()
With Application.CommandBars("worksheet menu bar").Controls("file")
On Error Resume Next
.Controls("MyNew").Delete
On Error GoTo 0
End With
End Sub
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
Short course:
Start a new workbook
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook
should look like: VBAProject (book1.xls)
right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side
Paste the code in there.
Now back to excel and save this as an addin in your XLStart folder.
Microsoft Addin will show up at the bottom of the "save as type" dropdown in the
File|SaveAs dialog.
And you can find your XLStart folder by going back to the VBE (alt-F11).
hit ctrl-g to see the immediate window
and type this and hit enter:
?application.StartupPath
I get this using win98 and xl2002:
C:\WINDOWS\Application Data\Microsoft\Excel\XLSTART
SDecou wrote:
When I click on the menu item File/New or the toolbar button File/New I would like the New Dialog box to open instead of going to the Task Pane and then having to select "on my computer". Is there a way to do this?
--
Dave Peterson
--
Dave Peterson
Reply With Quote