M
ManhattanRebel
I am prompting the user for a numeric value with an inputbox. Here:
Answer = Application.InputBox(Prompt:="What is the Number?", Type:=1)
I then use cells.find command to search a range (column) for the numeric
value.
Here:
Cells.Find(What:="Answer", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
It searches the range, but it returns the error "Object variable not set."
However, if I had used the "SET" command for the variable "Answer", the type
wouldn't match, because that requires a "range" type variable, not a numeric
value.
Answer = Application.InputBox(Prompt:="What is the Number?", Type:=1)
I then use cells.find command to search a range (column) for the numeric
value.
Here:
Cells.Find(What:="Answer", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
It searches the range, but it returns the error "Object variable not set."
However, if I had used the "SET" command for the variable "Answer", the type
wouldn't match, because that requires a "range" type variable, not a numeric
value.