Results 1 to 3 of 3

Thread: still need help

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Australia
    Posts
    7

    Arrow

    Please can someone post the stuff about the MSGBox functions because i'm doing research from home but VB is at school so i can't access it at the moment. But still need the information.

  2. #2
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Gig Harbor, WA; Posts: 89950
    Posts
    360

  3. #3
    Guest
    Here's some examples I just wrote now..hope they help you.

    Code:
    'ok/cancel
    msg = MsgBox("Would you like some pie?", 1) 'you can add an icon by putting a + after the three and a 16, 32, 48, 64
    If msg = 1 Then
    MsgBox "You pressed Ok...go help yourself."
    Else
    MsgBox "You pressed cancel...it's good pie!"
    Exit Sub
    End If
    
    'abort/ignore/retry
    msg = MsgBox("Would you like some pie?", 2) 'you can add an icon by putting a + after the three and a 16, 32, 48, 64
    If msg = 3 Then
    MsgBox "You pressed abort...cancelling pie?"
    ElseIf msg = 4 Then
    MsgBox "You pressed retry...sorry, i ate all the pie!"
    ElseIf msg = 5 Then
    MsgBox "You pressed ignore...don't ignore pie...you know you want it!"
    End If
    
    'yes/no/cancel
    msg = MsgBox("Would you like some pie?", 3) 'you can add an icon by putting a + after the three and a 16, 32, 48, 64
    If msg = 6 Then
    MsgBox "You pressed yes...go help yourself."
    ElseIf msg = 2 Then
    MsgBox "You pressed cancel...it's good pie!"
    ElseIf msg = 7 Then
    MsgBox "You pressed no...it's good pie, my mom made it!"
    End If
    
    'yes/no
    msg = MsgBox("Would you like some pie?", 4) 'you can add an icon by putting a + after the three and a 16, 32, 48, 64
    If msg = 6 Then
    MsgBox "You pressed yes...go help yourself."
    Else
    MsgBox "You pressed no...it's good pie!"
    Exit Sub
    End If
    
    'retry/cancel
    msg = MsgBox("Would you like some pie?", 5) 'you can add an icon by putting a + after the three and a 16, 32, 48, 64
    If msg = 4 Then
    MsgBox "You pressed retry...sorry, i ate all the pie!"
    ElseIf msg = 2 Then
    MsgBox "You pressed cancel...it's good pie!"
    ElseIf msg = 7 Then
    MsgBox "You pressed no...it's good pie, my mom made it!"
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width