PC Review


Reply
Thread Tools Rate Thread

Calling msgbox in Excel

 
 
=?Utf-8?B?QmVu?=
Guest
Posts: n/a
 
      5th Dec 2006
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



--

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      5th Dec 2006
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).

--
Regards,
Tom Ogilvy


"Ben" wrote:

> 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
>
>
>
> --
>

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      5th Dec 2006
I haven't worked in .NET, but here is some added:

http://support.microsoft.com/kb/306682/en-us
How to run Office macros by using Automation from Visual Basic .NET

http://support.microsoft.com/kb/303871/en-us
How To Create an Excel Macro by Using Automation from Visual Basic .NET

--
Regards,
Tom Ogilvy



"Ben" wrote:

> 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
>
>
>
> --
>

 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      5th Dec 2006
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

"Ben" <(E-Mail Removed)> wrote in message
news:BC66B2AC-21EF-43E1-8B24-(E-Mail Removed)...
> 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
>
>
>
> --
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Substituting my own MsgBox for the standard delete confirm MsgBox John S. Ford, MD Microsoft Access Getting Started 8 20th Aug 2004 12:05 AM
Substituting my own MsgBox for the standard delete confirm MsgBox John S. Ford, MD Microsoft Access Forms 8 20th Aug 2004 12:05 AM
Substituting my own MsgBox for the standard delete confirm MsgBox John S. Ford, MD Microsoft Access 8 20th Aug 2004 12:05 AM
Substituting my own MsgBox for the standard delete confirm MsgBox John S. Ford, MD Microsoft Access Form Coding 8 20th Aug 2004 12:05 AM
Msgbox VB.NET -Excel HOW?? Per Ove Steinsland Microsoft VB .NET 2 17th Aug 2004 11:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:21 PM.