View Single Post
 
Old 08-19-2020, 08:02 AM
MikeK MikeK is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Aug 2020
Posts: 9
MikeK is on a distinguished road
Default

Thanks again for taking the trouble to reply trevorc.

However I don't think you've understood the 'problem' that I would like to solve.

I have written the logic, to interrogate an Excel file, in VB6 which will then send out any email notifications as required. The VB6 logic closes the Excel file when all is complete.

I would just like to create a more elegant solution than having VB and VBA code in two different files by having it all in the workbook.
If the Workbook_Open event can determine if the workbook was opened by an end user or opened automatically then the correct procedures can be run.

I could address the issue by creating a modal form with an OK button and a timer and if no response was given then assume that it was an automatic run. But that, I feel, is far less elegant than the current set up (and relies on a user responding in a timely fashion).

I notice this forum has allocated me the title of 'novice' which as far as this forum is concerned is true. But as far as programming is concerned I have been automating Excel and Access applications since the mid 90's when VBA was introduced. My mainframe programming credentials hark back to the 80's. So only useful suggestions please.
Reply With Quote