daniel50096230
Board Regular
- Joined
- May 2, 2008
- Messages
- 163
Hi,I would like to validate that the row that choose by the user is end with 3...Means 3,13,23,33...How can I validate it?
Sub test()
Dim r As Range
Set r = Application.InputBox(Prompt:="Pick a cell.", Type:=8)
If r.Rows.Count = 1 Then
If Right(r.Row, 1) <> 3 Then
MsgBox "Bad row!!"
End If
Else
MsgBox "You picked more than one row!!"
End If
End Sub
Sub InputBoxToSelectRange()
Dim r As Range
On Error GoTo Handler
Set r = Application.InputBox("Select the Range to Process", Type:=8)
On Error GoTo 0
~~Proceed with the rest of your routine here.
Handler:
MsgBox "You cancelled!!"
End Sub