Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a property that I can read to find out if a file was specified to
open when starting Excel? In other words, if Excel was opened via the Start menu (so the application opens, but no file is opened), or if Excel was opened by double-clicking on an .xls file (so the application opens, then the specified file opens). The reason I would like to know is that I have created an .xls file, located in my XLSTART folder, that provides some additional functionality not native to Excel. When this file is not present, and I open Excel via the Start menu, a blank worksheet is created. When the file is present, and I open Excel via the Start menu, a blank worksheet is not created. I would like to have the blank worksheet created when my file is present in the XLSTART folder. I know I can make this happen by placing the line "Application.Workbooks.Add" in the "Workbook_Open" Application Event of the file in XLSTART, but when Excel is opened by double-clicking on an .xls file, a blank workbook is created as well, and I would prefer that not to happen. If I could get an answer to my question, I would be able to add a workbook only if Excel was opened without specifying a file. I cannot do this by counting the number of open workbooks, because my file in XLSTART loads before any other .xls file that may have been opened. I hope I have described this clearly. If not, please let me know. Thanks in advance for any help that may be forthcoming. -Michael |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Determine Excel file version with no file extension. | Excel Discussion (Misc queries) | |||
Starting an Excel 2003 file from Excel 2007 | Setting up and Configuration of Excel | |||
Starting Excel from a file | Excel Programming | |||
starting .bat file from excel VBA | Excel Programming | |||
Starting a userform upon starting the file | Excel Programming |