VisualBasic MsgBox
Author: Panache
Creation Date: 3/20/2010 6:56 PM
profile picture

Panache

#1
I'd like to include a Microsoft.VisualBasic.Interaction.MsgBox in my script. I have the reference box for Microsoft VisualBasic checked.

There's obviously something I don't know about how to do this in Wealth-Lab Pro v 5.6, because everything I try results in a compilation error.

Can anyone show me how to code something like the following example from MSDN in Wealth-Lab Pro?

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Don't program what you can beg, borrow or steal! :)

Community.Components > Input.
profile picture

Panache

#3
I want to add a simple "OK/CANCEL" message box. Unfortunately, both Input and Microsoft.VisualBasic.Interaction.InputBox are rather inartful ways of doing this, since they suggest to the user that something needs to be input.

I found an example showing how to display the Message Box.

CODE:
Please log in to see this code.


However, I still can't figure out how to use the result.

CODE:
Please log in to see this code.


generates an implicit conversion error, saying an explicit conversion exists. How do I do the explicit conversion?



profile picture

Eugene

#4
QUOTE:
generates an implicit conversion error, saying an explicit conversion exists. How do I do the explicit conversion?

You forgot to cast the value (btw, it is explicitly suggested to you by the compiler):
CODE:
Please log in to see this code.
profile picture

Panache

#5
Thanks.

For those who may be interested in this thread in the future, here is an even simpler way to do this:

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).