View Single Post
 
Old 08-10-2020, 08:11 AM
MikeK MikeK is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Aug 2020
Posts: 9
MikeK is on a distinguished road
Default Identify what process opened a workbook.

I currently have a VB routine that interrogates a workbook each night and determines whether to send out some email notifications. When it's done its job it closes the workbook.

The workbook is also opened on an ad-hoc basis for query and/or update.

I would like to dispense with the VB routine that runs each night via the task manager and open the workbook itself directly from the task manager and then run the logic for the notifications from within that workbook.

For this to be successful I would need to identify whether the workbook was opened by the task manager or an end user so that the appropriate macros are called.

Any ideas as to whether I'm able to tell what process opened the workbook?

Can I pass any parameters to the workbook when opening it from the task manager, and if so how?
Reply With Quote