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?
Printable View
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?
VB Code:
Private Sub Command1_Click() Dim s As String s = InputBox("Testing") If StrPtr(s) = 0 Then MsgBox "User pressed cancel" Else MsgBox s End If End Sub
hehe, works like a charm :)
Thanks