File New... Template New Workbook On my computer

  • Thread starter mjt7email-ggroups
  • Start date
M

mjt7email-ggroups

Hello Everyone

I've just installed Office 2003 (and kept Office 97).

My initial job is to convert an Access database from 97 to 2003. But
the Finance dept use custom Excel templates to manipulate data
exported from the database to Excel, so I also have to test this
process to make sure everything is working as it should.

In Excel 2003, I couldn't find a built-in option to bypass the extra
window when I click File | New...
This is followed by the window "New Workbook" meaning an extra step to
click "On my computer..."
I understand that having used the template once, it is listed under
"Recently used templates" but the extra step is (or was) annoying me.

In the end, I copied the following code from my 97 personal.xls to a
new 2003 Personal Macro Workbook and it solved the problem, but I
wonder if it might trash my 2003 installation.

Sub FileNew_TemplateList()
On Error Resume Next
SendKeys "%2"
Application.Dialogs(xlDialogNew).Show
End Sub

I use this in 97 to show the template names as a list rather than
icons, but in 2003 it has the additional benefit of skipping the extra
window. Anyway, with the code assigned to a toolbar button, I'm now
set to go - but is it likely to cause problems in 2003?

Thank you for any help,
Marguerite
 
J

Jim Rech

but I wonder if it might trash my 2003 installation.

Heavens no. But I don't see the point of the Sendkeys, at least in Excel
2003. This seems to suffice:


Sub FileNew_TemplateList()
Application.Dialogs(xlDialogNew).Show
End Sub
 
G

Gord Dibben

Create the template and Save as BOOK.XLT

Store in your XLSTART folder and it will become the default for File>New

Note the absence of the ellipsis after New

This bypasses the extra step.

To get the "New" without ellipsis go to Tools>Customize>Commands>File

Drag to your File menu.

Or use the New File button


Gord Dibben MS Excel MVP
 
M

mjt7email-ggroups

Thank you Jim, and Gord, for your reply.

The only purpose for the SendKeys was to over-ride the default icon
view in the template folder window. I prefer the list view - similar
to pressing the 2nd button (of three) when you get to the template
window, which becomes a session default.

I was told years ago when I was given the code that since, in Excel 97
(and Word), users can't set a preferred view for the template window,
the only option was to use SendKeys. Perhaps there is an alternative
in 2003?

I'll test commenting out the SendKeys, but if doing so restores the
default icon view, then I can easily put it back.

You might guess that I hate doing anything more than once, so thanks
for the confirmation that I can use it<s>.

I barely know Excel VBA, but the macro was called FileNew() in 97 to
hook into the default command. I renamed it so it wouldn't interfere
with the default installation and assigned it to a custom toolbar
icon.

Regards
Marguerite
 
J

Jim Rech

I prefer the list view

Ahh, yes. Well Sendkeys is the way to go then.

--
Jim
| Thank you Jim, and Gord, for your reply.
|
| The only purpose for the SendKeys was to over-ride the default icon
| view in the template folder window. I prefer the list view - similar
| to pressing the 2nd button (of three) when you get to the template
| window, which becomes a session default.
|
| I was told years ago when I was given the code that since, in Excel 97
| (and Word), users can't set a preferred view for the template window,
| the only option was to use SendKeys. Perhaps there is an alternative
| in 2003?
|
| I'll test commenting out the SendKeys, but if doing so restores the
| default icon view, then I can easily put it back.
|
| You might guess that I hate doing anything more than once, so thanks
| for the confirmation that I can use it<s>.
|
| I barely know Excel VBA, but the macro was called FileNew() in 97 to
| hook into the default command. I renamed it so it wouldn't interfere
| with the default installation and assigned it to a custom toolbar
| icon.
|
| Regards
| Marguerite
|
|
| Jim Rech wrote:
|
| > >>but I wonder if it might trash my 2003 installation.
| >
| > Heavens no. But I don't see the point of the Sendkeys, at least in
Excel
| > 2003. This seems to suffice:
| >
| >
| > Sub FileNew_TemplateList()
| > Application.Dialogs(xlDialogNew).Show
| > End Sub
| >
| >
| > --
| > Jim
| >
| > > Hello Everyone
| > >
| > > I've just installed Office 2003 (and kept Office 97).
| > >
| > > My initial job is to convert an Access database from 97 to 2003. But
| > > the Finance dept use custom Excel templates to manipulate data
| > > exported from the database to Excel, so I also have to test this
| > > process to make sure everything is working as it should.
| > >
| > > In Excel 2003, I couldn't find a built-in option to bypass the extra
| > > window when I click File | New...
| > > This is followed by the window "New Workbook" meaning an extra step to
| > > click "On my computer..."
| > > I understand that having used the template once, it is listed under
| > > "Recently used templates" but the extra step is (or was) annoying me.
| > >
| > > In the end, I copied the following code from my 97 personal.xls to a
| > > new 2003 Personal Macro Workbook and it solved the problem, but I
| > > wonder if it might trash my 2003 installation.
| > >
| > > Sub FileNew_TemplateList()
| > > On Error Resume Next
| > > SendKeys "%2"
| > > Application.Dialogs(xlDialogNew).Show
| > > End Sub
| > >
| > > I use this in 97 to show the template names as a list rather than
| > > icons, but in 2003 it has the additional benefit of skipping the extra
| > > window. Anyway, with the code assigned to a toolbar button, I'm now
| > > set to go - but is it likely to cause problems in 2003?
| > >
| > > Thank you for any help,
| > > Marguerite
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top