Calling msgbox in Excel

G

Guest

Hi all,

I just starting using VS2002. Currently in my Excel XP development, I can
use the msgbox to have it display a message.

While I was experimenting with VS 2002 and the PIA, I was wondering how I
can cause Excel to display a msgbox instead of one from the VS 2002 code.
Displaying a msgbox from within VS2002 causes the msgbox to appear behind
Excel. Whereas I would like to code it in such a way in VS2002 such that
when I instantiate an instance of Excel I would like Excel to display a
msgbox so that it is on top/ in front of Excel instead of behind it. Any
ideas? Thanks.

Ben



--
 
G

Guest

You would have to call a macro or otherwise execute a macro in Excel (written
in VBA) that displays the message box. (and perhaps returns a value).
 
N

NickHK

Ben,
That MsgBox is not part of Excel, but VBA. Its full reference is :
VBA.Interaction.MsgBox

So unless you can access this from your environment, you are out of luck.
Excel does have an InputBox method, but that may not be want you want.

Otherwise maybe the MessageBox/MessageBoxEx API calls will do what you need.

NickHK
 

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