Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find code not finding the value - error

Status
Not open for further replies.

t16turbo

Programmer
Mar 22, 2005
315
0
0
GB
Hi,

I have some vba that searches for a value in a specified column.

Code:
 Range(Columns("A:A").Find("Unplanned Very Likely").Offset(0, 0), _
    Columns("A:A").Find("Unplanned Very Likely Total").Offset(0, 14)).Cut


if that value doesn't exist it returns an error.
"object variable or with block variable not set".

is there a way around this?
thanks in advance,

 
yup - use an IF statement

very good example in the help files

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top