Aaron B
2009-07-17 07:47:07 UTC
An InputBox give a choice of "vbOK" and "vbCancel".
If OK is chosen it takes the entered text by default
Is there a way to control the vbCancel when that is chosen?
I think my problem is that I need to dimension my variable in accordance with the selection.
Here is a simplified section of code.
Dim OfficeFax as String
OfficeFax = inputbox("What is the fax number at " & job, "Fax Number", "Enter work fax number here or leave blank")
If OfficeFax = "Enter work fax number here or leave blank" Or OfficeFax = "" Then
OfficeFax = "Not Available"
End If
Range("d15") = OfficeFax
I want to include something like
If OfficeFax = vbCancel Then
Exit Sub
End If