[RESOLVED] Is there a way to determine who opened an Excel workbook?
We have Excel workbooks that are currently opened manually. When opened, SFTP download macros are automatically executed. We will be automating the opening of these workbooks via Windows scheduled tasks so that the downloads are done automatically each morning.
First, does anyone have any examples of job streams (MSDOS .bat files) that open Excel and Access and auto execute macros?
Second, is there a way to determine if the Excel workbook was opened manually by a user or opened via a scheduled .bat file task? It's important to know how the workbooks were opened.
Thanks.
Re: Is there a way to determine who opened an Excel workbook?
I don't think so, however while using a bat you are in control of who is opening. Just use the bat-file to create a value/setting etc to show it was open by the bat-file.
Re: Is there a way to determine who opened an Excel workbook?
you can use the commandline arguments to pass some parameter when auto opening the file, so that you know it was not opened manually, you would need to use APIs to get the commandline
their is also a last author builtin document property, but i assume that will be the person previous to the current opening of the workbook
Re: Is there a way to determine who opened an Excel workbook?
Thank you. I'll use GetCommandLine.
Re: [RESOLVED] Is there a way to determine who opened an Excel workbook?
the API getcommandline as string will just crash excel
see the last post in this thread for how to do it
http://www.vbforums.com/showthread.php?t=634313
Re: [RESOLVED] Is there a way to determine who opened an Excel workbook?