If you click okay with a blank inputbox its going to tell you your input is incorrect and give you the option to correct (native function of inputbox).
Your only options will be input a range and click okay or hit cancel and exit.
Dim categorycolumn As Long
On Error Resume Next
categorycolumn = Application.InputBox("Which column do you want select?", "Column", Type:=8).Column
On Error GoTo 0
If categorycolumn > 0 Then
MsgBox categorycolumn
End If
e/ I just noticed the title says return the ADDRESS of the column or cell you selected and not the column number. Are you looking for the address of the selected cell (i.e. C5)?
Sorry for not paying attention.
Bookmarks