Hi everybody:
I have written an app in Excel that has a custom menu bar. The app copies and manipulates data from the source workbook into a target workbook, either in one fell swoop or by the user selecting individual menu items for the various steps, and then formats the target book for import into an off the shelf application.
Problem is, my users like to have multiple Excel files open while this is running, and they like to work on them. I naturally don’t want my custom menu bar affecting their other worksheets. Actually, I’d like it hidden whenever they click on a different workbook. I’ve tried hiding or deleting it programmatically, but when it’s needed, the users can still open another Excel file by double-clicking its icon in Explorer or their desktop. So, I thought I’d trap their click events via the API using GetAsyncKeyState, then test which workbook they clicked. However, this code needs to run in the background while my other code is running, so I can’t just use the timer function, and I don’t see a VB timer control anywhere in the toolbox list.
Any ideas? Does anyone know if the VB timer control (or something similar) is available for Excel workbooks and, if so, what it’s called?
Thank you in advance for your help.