Question : if inputbox cancel vba
Answered by : s3ns4
Private Sub test() Dim result As String result = InputBox("Enter Date MM/DD/YYY", "Date Confirmation", Now) If StrPtr(result) = 0 Then MsgBox ("User canceled!") ElseIf result = vbNullString Then MsgBox ("User didn't enter anything!") Else MsgBox ("User entered " & result) End If
End Sub
Source : https://stackoverflow.com/questions/26264814/how-to-detect-if-user-select-cancel-inputbox-vba-excel/26264885 | Last Update : Thu, 22 Jul 21