Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
respond to message box
I have written a code to solve an equation in excel visual basic. Every time the sover windows appear I have to click OK for the rest of the macto to continue. What command I can use to press OK automatically in the message box |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
respond to message box
Avencia,
I am not familiar with solver, but this might be the answer (place it at the top of your subroutine) ... Application.DisplayAlerts = False Hope it helps. -- Thx MSweetG222 "Avecina" wrote: I have written a code to solve an equation in excel visual basic. Every time the sover windows appear I have to click OK for the rest of the macto to continue. What command I can use to press OK automatically in the message box |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
respond to message box
THanks but it did not work. Can you tell me if I can write a code to answer
the dialogue box automatically? FOr expample to press OK automaically? Avecina "MSweetG222" wrote: Avencia, I am not familiar with solver, but this might be the answer (place it at the top of your subroutine) ... Application.DisplayAlerts = False Hope it helps. -- Thx MSweetG222 "Avecina" wrote: I have written a code to solve an equation in excel visual basic. Every time the sover windows appear I have to click OK for the rest of the macto to continue. What command I can use to press OK automatically in the message box |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
respond to message box
Avecina,
Try this: If the message box has the OK or YES button highlighted (ie: if you just press enter, while message box is up, the OK/YES button will be pressed) SendKeys {Enter} If the Y in YES or the O in OK have an underscore, try this.... SendKeys "Y" ' if a YES button is involved SendKeys "O" ' if an OK button is involved Let me know if this works. Good Luck!!! -- Thx MSweetG222 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
respond to message box
Forgot to mention, that sendkey code goes just before the solver is initiated
(ie: the place in your code where the next step would bring up the msgbox sooner or later) -- Thx MSweetG222 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
(save as) does not respond | Excel Discussion (Misc queries) | |||
Having to click a Cmd button twice to get it to respond | Excel Programming | |||
Re-calculation causes Excel to not respond | Excel Discussion (Misc queries) | |||
Automatically respond to message box appearing within a VBA macro | Excel Programming | |||
LinkedCell Update does not always respond | Excel Programming |