Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine if an excel Excel was open by code (automation) ormanually, by a human user
Hi. An excel file is opened by people, but also by code from a VB
application. I would like the code in Workbook_Open to run whenever the file is opened by a human, but not to run when the file is opened by automation. Any ideas ? Thank you very much Alex. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine if an excel Excel was open by code (automation) or manually, by a human user
hi, Radu ! Hi. An excel file is opened by people, but also by code from a VB application. I would like the code in Workbook_Open to run whenever the file is opened by a human but not to run when the file is opened by automation. Any ideas ? (i.e.) Private Sub Workbook_Open() If Not Application.UserControl Then Exit Sub ' here your normal actions ...' End Sub hth, hector. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine if an excel Excel was open by code (automation) or manually, by a human user
In the code that will open the file (by automation) bracket the file open
command with: Application.EnableEvents=False 'your file open command goes here Application.EnableEvents=True HTH Otto "Radu" wrote in message ... Hi. An excel file is opened by people, but also by code from a VB application. I would like the code in Workbook_Open to run whenever the file is opened by a human, but not to run when the file is opened by automation. Any ideas ? Thank you very much Alex. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine if an excel Excel was open by code (automation)or manually, by a human user
Wow ! Great tips, guys ! Thanks a lot - tomorrow I'll try both
solutions - first thing in the morning. Thanks again, and have a great day ! Radu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Human Interface Device How To | Excel Discussion (Misc queries) | |||
Excel fails to open workbook using Automation from VB 6 | Excel Programming | |||
Run Excel Report on Server w/out human interaction | Excel Programming | |||
Knowledge gained from Access to Excel VBA Automation User request | Excel Programming | |||
Save Event - Determine if called by code or user | Excel Programming |