Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


2 questions about MsgBox's

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,46913
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> 2 questions about MsgBox's
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 2 questions about MsgBox's - 5/9/2007 8:30:45 PM   
  markmcrobie

 

Posts: 314
Score: 0
Joined: 12/12/2006
Status: offline
1) Why do we sometimes use parenthesis and sometimes not? (i.e. sometimes I see MsgBox("Hello",0,"Title") and sometimes just MsgBox "hello",0,"title"?

2) If want to display a string stored in a variable to my users.  However I need them to be able to select it and copy/paste it.  A MsgBox doesn't seem to let them select the text.  Any way round this?
 
 
Post #: 1
 
 RE: 2 questions about MsgBox's - 5/9/2007 8:35:12 PM   
  markmcrobie

 

Posts: 314
Score: 0
Joined: 12/12/2006
Status: offline
I kinda sorted Q2 above, I used an input box instead of a MsgBox, and simply made it's default value the string I want them to be able to copy/paste.

Not ideal though, as InputBoxes have Ok and Cancel buttons, and I don't want to confuse my users.

(in reply to markmcrobie)
 
 
Post #: 2
 
 RE: 2 questions about MsgBox's - 5/9/2007 9:20:11 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
It depends on whether you want to assign the return value to a variable or not.  If you do, you need to surround the parameters for Msgbox in parentheses

Personally, I always use parentheses as I find it makes it easier to read.

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to markmcrobie)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> 2 questions about MsgBox's Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts