Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way via code to determine how Excel was opened? I want to run a
startup macro but only if Excel is opened via automation. Specifically, I'm writing to an excel sheet from SQL server using OPENROWSET and I want to clear the previous data first. TIA Matt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not directly, though you might be able to infer if the instance was
automated if normally you'd expect a personal.xls and one or more installed addins to be loaded. If not present as expected would likely mean it was originally automated (though not necessarily an longer). The 'specific' details you gave does not give any useful information as to why you want to know. Regards, Peter T "Matt Williamson" wrote in message ... Is there any way via code to determine how Excel was opened? I want to run a startup macro but only if Excel is opened via automation. Specifically, I'm writing to an excel sheet from SQL server using OPENROWSET and I want to clear the previous data first. TIA Matt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not directly, though you might be able to infer if the instance was
automated if normally you'd expect a personal.xls and one or more installed addins to be loaded. If not present as expected would likely mean it was originally automated (though not necessarily an longer). The 'specific' details you gave does not give any useful information as to why you want to know. Is there any way via code to determine how Excel was opened? I want to run a startup macro but only if Excel is opened via automation. Specifically, I'm writing to an excel sheet from SQL server using OPENROWSET and I want to clear the previous data first. TIA Matt I have to re-think this. OPENROWSET doesn't instantiate an instance of Excel so I doubt any opening code would run. I'll just make a blank template and create a copy to dump the results into. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i determine when a file was last opened | Excel Discussion (Misc queries) | |||
Determine if XL file opened from Outlook or a saved file | Excel Programming | |||
stop excel file opened as read only if already opened by another u | Excel Programming | |||
How to determine an opened sheet( Read Only) | Excel Programming | |||
How to determine if Workbook has been opened exclusively | Excel Programming |