![]() |
XLStart and VB
I have a VB application that launches Excel:
XL = CreateObject("Excel.Application") Then either opens a workbook or creates a new workbook. Anyway, I created an application-level event in Excel to write to a text file any time Excel is opened. I created the event in the Personal.xls workbook since it opens when Excel does. I tested it by opening various workbooks and it worked. But here's the thing. When VB opens Excel, the personal.xls workbook does not open. In fact nothing I put in the XLStart folder opens. Does VB somehow bypass the XLStart folder? What can I do as an alternative? tod |
XLStart and VB
oxlApp.Workbooks.Open oxlApp.Path & "\xlStart\personal.xls"
-- Regards, Tom Ogilvy "Tod" wrote in message ups.com... I have a VB application that launches Excel: XL = CreateObject("Excel.Application") Then either opens a workbook or creates a new workbook. Anyway, I created an application-level event in Excel to write to a text file any time Excel is opened. I created the event in the Personal.xls workbook since it opens when Excel does. I tested it by opening various workbooks and it worked. But here's the thing. When VB opens Excel, the personal.xls workbook does not open. In fact nothing I put in the XLStart folder opens. Does VB somehow bypass the XLStart folder? What can I do as an alternative? tod |
XLStart and VB
Thanx Tom. I can use this at the VB app level.
Is there something I can do in the Excel application that will allow it to run the logging code whenver Excel is opened - by VB, manually or otherwise? tod |
XLStart and VB
Only by using the workbook_open event for the personal.xls and having the vb
code load the personal.xls. Or, I would assume the vb code is opening excel for some reason. You might put some code in the workbook events of the workbook opened by the VB code. Or have the vb code run the logging code. When Excel is open via automation, it is basically in "slave" mode - not tryin to do things on its own. -- Regards, Tom Ogilvy "Tod" wrote in message ups.com... Thanx Tom. I can use this at the VB app level. Is there something I can do in the Excel application that will allow it to run the logging code whenver Excel is opened - by VB, manually or otherwise? tod |
All times are GMT +1. The time now is 02:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com