Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 08-23-2020, 06:06 AM
Guessed's Avatar
Guessed Guessed is offline Identify what process opened a workbook. Windows 10 Identify what process opened a workbook. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I don't know how you would approach this problem but I'll give you a couple of things you could explore.

I haven't used scheduled tasks before but is it possible to spawn two steps when the workbook opens via the scheduled task. For example, create a temp file and then open the workbook. The code in the workbook_Open event could check for the existence of this temp file and if it exists, delete it and assume the event was kicked off automatically.

Another alternative is for the scheduled task to be told to open the workbook and include a startup switch to let the macro know. In Word you can specify a macro to run via a startup switch but the following link doesn't include a switch for a macro so we need to think laterally. Looking at the options there, I would maybe specify a startup path and then have the Workbook_Open test what startup path is specified.
Start-up/Command-line Switches For Excel. Fix, Repair Or Customize Microsoft Excel
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copy a workbook to another workbook and keep the formatting within the new workbook excelforsue Excel 3 09-15-2020 03:37 AM
Sharing a Workbook that contains array formula link to other workbook Ahmad.rage22@gmail.com Excel 0 03-12-2018 10:15 PM
data entered in one workbook should be updated in other relevant workbook based on the date vedha Excel 0 04-24-2015 08:45 PM
Identify what process opened a workbook. #REF! error when opening a workbook that contain a refference to another workbook tanababa Excel 2 06-07-2012 03:11 PM
Range(Cell1,Cell2) Error on another workbook controlling some other workbook? tinfanide Excel Programming 1 02-09-2012 04:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft