Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
declaring a msgbox
Hello, I'm writing my first function using both an inputbox and
msgbox. Do I have to declare them at the beginning of the procedure? i.e. dim msgbox as variant Also, after doing this and using the F8 function to do a trial ru through the code to see how it executes, it appears that the sub wor at the beginning of the function causes a problem. Is it that thi cannot qualify as a subprocedure? What should I do instead? Thank you in advance. Trace -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
declaring a msgbox
On Tue, 11 May 2004 19:17:31 -0500, Tracey
wrote: Hello, I'm writing my first function using both an inputbox and a msgbox. Do I have to declare them at the beginning of the procedure? i.e. dim msgbox as variant Also, after doing this and using the F8 function to do a trial run through the code to see how it executes, it appears that the sub word at the beginning of the function causes a problem. Is it that this cannot qualify as a subprocedure? What should I do instead? Thank you in advance. Tracey The problem is that you're treating 'msgbox' as a variable - it's not, it's a built-in function. The proper usage of msgbox is either of the following two: Msgbox "Message" x = Msgbox ("Message") The second one is what you use if you want to know what button was pressed - there are named constants (VbOk, VbYes, etc) that identify which one. -- auric underscore underscore at hotmail dot com ***** Witty remarks disabled until further notice. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
declaring a msgbox
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Declaring variables | Excel Discussion (Misc queries) | |||
Declaring a value to equal 100% | Charts and Charting in Excel | |||
Declaring a DLL | Excel Programming | |||
Declaring a variable? | Excel Programming | |||
Declaring Variables | Excel Programming |