I have a macro that loops through and opens a number of files. In each file there is an event procedure upon opening that displays an informational msgbox (The only option is to click ok). I'm trying to have my code click okay so that I don't have to sit here and hit enter (literally hundreds of times) as each file opens. Application.dip lay alerts = false does not work, and changing the msgbox event procedure is unfortunately not an option. Any code that would take care of this would be greatly appreciated.
Auto Answer a Msgbox that appears upon opening file
Collapse
X
-
-
This really depends upon your code and what you are doing, but, one can accomplish this with the EnumChildWindow s API to look for the msgbox and then use it to find the button handle. Then you can use SendMessage to send WM_MBUTTONDOWN AND WM_MBUTTONUP messages to the button to simulate a click on it...
Good Luck
Comment