User User name Password  
   
Sunday 24.11.2024 / 03:00
Search AfterDawn Forums:        In English   Suomeksi   På svenska
afterdawn.com > forums > software, operating systems and more > windows - general discussion > vbs msgbox help
Show topics
 
Forums
Forums
vbs msgbox help
  Jump to:
 
Posted Message
bizkit101
Junior Member
_
30. September 2009 @ 16:52 _ Link to this message    Send private message to this user   
I am looking for a way to have a msgbox that if you press yes it does something.
and if you press no it does something else.
i read somewhere that there is like a number for each button that determines the response. but i cant find it.

if you could give me a list of the numbers and a sample code for me to screw around with.

and if you could do this with an inputbox that would help.
i need it to say something like confirmed if they hit ok and say something like not confirmed if they hit cancel and dont type anything
Member
_
1. October 2009 @ 04:37 _ Link to this message    Send private message to this user   
You need to specify the msgbox as a variable. So, for example:


Dim response

response = MsgBox("Choose yes or no!",vbYesNo)

If response = vbYes Then 
 MsgBox("You clicked yes!")
Else
 MsgBox("You clicked no!")
EndIf

Have a look here for a more detailed explaination.


This message has been edited since posting. Last time this message was edited on 1. October 2009 @ 04:37

afterdawn.com > forums > software, operating systems and more > windows - general discussion > vbs msgbox help
 

Digital video: AfterDawn.com | AfterDawn Forums
Music: MP3Lizard.com
Gaming: Blasteroids.com | Blasteroids Forums | Compare game prices
Software: Software downloads
Blogs: User profile pages
RSS feeds: AfterDawn.com News | Software updates | AfterDawn Forums
International: AfterDawn in Finnish | AfterDawn in Swedish | AfterDawn in Norwegian | download.fi
Navigate: Search | Site map
About us: About AfterDawn Ltd | Advertise on our sites | Rules, Restrictions, Legal disclaimer & Privacy policy
Contact us: Send feedback | Contact our media sales team
 
  © 1999-2024 by AfterDawn Ltd.

  IDG TechNetwork