Results 1 to 3 of 3

Thread: Inputbox-Cancel not working

  1. #1

    Thread Starter
    Hyperactive Member Blacknight's Avatar
    Join Date
    Nov 2002
    Posts
    381

    Resolved Inputbox-Cancel not working

    MSDN states than when you press cancel buttong in an inputbox it returns "" and yet I get the inputbox's value. Anyone has any idea why this happens? how can i find out if user pressed cancel?
    Last edited by Blacknight; Oct 26th, 2004 at 05:17 PM.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim s As String
    3.  
    4.     s = InputBox("Testing")
    5.    
    6.     If StrPtr(s) = 0 Then
    7.         MsgBox "User pressed cancel"
    8.     Else
    9.         MsgBox s
    10.     End If
    11.    
    12. End Sub
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Hyperactive Member Blacknight's Avatar
    Join Date
    Nov 2002
    Posts
    381
    hehe, works like a charm

    Thanks

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