How do I create a macro to automatically click message boxes like YES or OK ?

J

Jim

Many, Many thanks for your help ...

1) How do I create a macro to automatically click message boxes like
YES or OK ?

2) Is there away as well to pre-select my choice (YES over no, for
example ...) ?

Much Appreciated !
jim
 
S

Steve Schapel

Jim,

1) Could you give an example of what you are trying to do here? The
idea of automatically clicking a message box doesn't make sense tome at
the moment... why have a message box at all?
2) There is a number coding system you can use with the MsgBox()
function to set the Default Button. The first button is always the
default, unless you specify otherwise. For example the value for the
second button to be default is 256. So as an example, you can use...
MsgBox("Your Message",308,"Title")
.... where the 308 results from 4+48+256 where 4 means use Yes and No
buttons, and 48 means show Exclamation icon, and 256 means second button
(No) is default. See Help on MsgBox function for more information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top