Noob VB question

Discussion in 'Programming General' started by Chuck Norr1s, Feb 7, 2008.

Noob VB question
  1. Unread #1 - Feb 7, 2008 at 3:43 PM
  2. Chuck Norr1s
    Referrals:
    0

    Chuck Norr1s Guest

    Noob VB question

    Well, i recently started VB (last night to be exact) and i have a noob question. How do you make it that when you click a button a window with text pops up? Thx, Chuck Norr1s.
     
  3. Unread #2 - Feb 7, 2008 at 4:01 PM
  4. hockeykid09
    Joined:
    Mar 16, 2007
    Posts:
    1,162
    Referrals:
    0
    Sythe Gold:
    0

    hockeykid09 Guru
    Banned

    Noob VB question

    Private Sub Command1_Click()
    MsgBox "your text here"
    End Sub

    "Command1" is the name of your command button
     
  5. Unread #3 - Feb 7, 2008 at 4:13 PM
  6. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    Noob VB question

    Code:
    Private Sub MyButton_Click()
    MsgBox MyText, BoxStyle, BoxTitle
    End Sub
    
    The name of your button is "MyButton" and when it is clicked on it uses the message box function (Msgbox) to display a message box with properties you can set.

    "MyText" is replaced by the text you want to display between quotation marks (" ").

    "BoxStyle" is optional and is to define the style of message box you want to display, just experiment with different ones ex: vbOkOnly, vbInformation, etc.

    "BoxTitle" is optional, but useful to set the title of the message box. By default if this isn't specified it just displays the name of your project.

    If you're just beginning nothing is really a noob question so try not to be afraid to ask. Just remember though that often you can learn best what you've figured out for yourself and there are tons of VB6 resources online so don't forget to check around as well.
     
  7. Unread #4 - Jun 3, 2008 at 11:10 PM
  8. awaw41
    Joined:
    Jun 19, 2007
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0

    awaw41 Newcomer

    Noob VB question

    Is there a way to make one with out VB i cant download that =(
     
< Someone Give Me 5M Please | I Really Need 5M SomeOne >

Users viewing this thread
1 guest


 
 
Adblock breaks this site