Thread: InStr
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default InStr

FGM,

For example:

Dim myRange As Range
On Error GoTo Badstring:
Set myRange = Range(UserForm1.TextBox1.Text)
MsgBox "Good string"
Exit Sub
Badstring:
MsgBox "That was bad."

HTH,
Bernie
MS Excel MVP


"FGM" wrote in message
...
Excel Microsoft XP on Windows 200

I am using a form as a utility for a group of macros and one of the text
filelds on form asks for the column and row to start the searh in ex. b2

I want to be able to check with vb that the user put both a numeric key and
a alpha key, better yet I would like to check that it is a valid address.

Any suggestions...

Thank you in advance....