Discussion on:

10
Comments

Join the conversation!

Follow via:
RSS
Email Alert
1 Vote
+ -
Why not do the simple thing and just hit the windows key and type xlstart?
0 Votes
+ -
Contributr
That pulls up the log on/off window for me.
0 Votes
+ -
Works for me
DBlayney Updated - 3rd Jul
The interesting point here is that typing xlstart in the "search programs and files" box shows the path of what used to be known as the "alternate" startup file (I think it was called this a generation or so ago). This path can also be found in Excel: Options: Advanced - General section (near the end).

Displaying Application.StartupPath shows the default path which may not be where you keep templates and your personal.xlsm macro file.

I always use an "alternate" folder somewhere in My Documents. This simplifies ensuring that changes get backed up by normal operations.

Interesting to see that "?" in the Immediate window appears to do the same as "debug.print"; is this documented anywhere?
? application StartUpPath
returns "Microsoft Excel"

+xlstart opens an empty folder
Raymond,
The correct syntax is application.StartupPath (note the period after "application").
The reason XLStart would be empty is that you have never created the "Personal" workbook which stores macros you record or write; or you have not put any other workbook into that folder. Personal will be created the first time you record a macro and indicate that you want to store it in Personal (as opposed to the current workbook). Personal is hidden, by default.
George
I failed to note that JimDantin replied to you about the missing period in your syntax. Sorry!
Thank you George. Now that it is pointed out I can see the dot - just. However the extra tip xlstar points to a different folder.
xlstart gives D:\Program Files\Microsoft Office\Office14\XLSTART (empty) [Programs are installed on D: whenever possible]. Whilst
?application.xlstart gives C:\Users\Ray_Admin\AppData\Roaming\Microsoft\Excel\XLSTART
but this folder cannot be found.
Look at the text closely - the italics font certainly doesn't help! There's a period between 'application' and 'StartupPath"

? application.StartupPath
0 Votes
+ -
Good
vinodhemdev 3rd Jul
Excellent tip
0 Votes
+ -
Nice!
Marshwiggle 5th Jul
Now, wouldn't it be even nicer if Microsoft finally standardized the Office apps so you could just store the template file wherever you wanted to and point to it using the File Locations tab in the Options dialog, as you can in Word? And while they're at it, maybe they could make it as easy to assign macros in Word as it is in Excel ... and maybe even record macros in Access and Outlook, like you can in Excel and Word.
Keyboard Shortcuts:
Prev
Next
Toggle
Join the conversation
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.