Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
(save as) does not respond busser Excel Discussion (Misc queries) 1 May 13th 06 10:32 AM
Having to click a Cmd button twice to get it to respond excelnut1954 Excel Programming 0 April 21st 06 05:01 PM
Re-calculation causes Excel to not respond Marina Excel Discussion (Misc queries) 3 April 28th 05 10:42 PM
Automatically respond to message box appearing within a VBA macro Daniel75 Excel Programming 3 February 25th 05 06:15 PM
LinkedCell Update does not always respond Jeroen Kluytmans Excel Programming 4 April 16th 04 08:58 AM


All times are GMT +1. The time now is 05:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"