CodeItBetter Programming Another VB Programming Blog

How to use InputBox function and get values

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
'Coding Basics - How to use InputBox function and get values
    Dim sInput As String
    sInput = InputBox("Test Title", "InputBox", "Some text here")
    If StrPtr(sInput) = 0 Then
        MsgBox "Cancel was pressed"
    Else
        If Len(sInput) = 0 Then
            MsgBox "OK pressed but nothing entered."
        Else
            MsgBox "OK pressed: value= " & sInput
        End If
    End If
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.