Hello guys!
I have a macro to drop shape on my visio drawing but for each shape a pop up appear and my code stop running.
The msgbox is an OK/cancel and and juste want to answer OK
Do you have an idea to automtically answer OK to a msgbox? or to avoid this msgbox from appear?
I try SendKeys {ENTER} but my code stop before reaching this command so it doesn't work :(
Thanks!!
Just delete code with msgbox :)
funny
Ahah wish it could be so simple..
The problem is that the MsgBox isn't in my code. Visio generetat it to aske me to do some settings on the shape I dropped with my code
try add time delay like as
PauseTime = 5 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop
SendKeys "{F4}", True
Have a look at:
http://msdn.microsoft.com/en-us/library/office/ff767782%28v=office.15%29.aspx
or
http://msdn.microsoft.com/en-us/library/office/aa215114%28v=office.11%29.aspx
or
http://www.vbforums.com/showthread.php?420883-FAQ-s-OD-How-do-supress-or-automatically-choose-Alerts-Prompts-in-a-drawing
Hope this helps.
So much Thanks paul, I just add this line
Application.AlertResponse=1
And all my problems are solved!
Merci!!
All of them? Marvellous!! :)
All of them for this macro at least!!
This line doesn't pay my rent unfortunately ;D