Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Find isn't finding whatever you have in variable z in the range
F2:F65536, so your first statement sets rng4 to Nothing (in other words, the object variable is not set). Your second statement then tries to use that variable, which isn't set to any range, as the basis for the Offset, which returns the error you get... In article , justagrunt wrote: Hi, I changed the code to read. Set rng4 = Sheet1.Range("F2:F65536").Find(what:=z) 'find the correct cell Set rng6 = rng4.Offset(0, 20) ' 0 cells down 20 cells across is the offset Set rng11 = rng6.Resize(, 5) 'add 0 rows and 4 columns to range rng10.Copy Destination:=Sheet1.Range(rng11.Address) '.PasteSpecial ' copy the value Unfortunately still getting the error message "Object variable or with block variable not set" error 91, which debuggs to line, Set rng6 = rng4.Offset(0, 20) ' 0 cells down 20 cells across is the offset ???????????????? dazed and confused - don't know apossible reason for this. Thanks for the support and your perserverance. -- Regards Bill "JE McGimpsey" wrote: Your now trying to assign the value found at rng4.Offset(0, 20) to the range pointed to by rng6, but you haven't set rng6 yet. Did you mean Set rng6 = rng4.Offset(0, 20) ? In article , justagrunt wrote: And now error at rng6 = rng4.Offset(0, 20) ' 0 cells down 20 cells across is the offset which has the same error even with "Set rng6......." of "Object variable or with block variable not set" What could be causing this now? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object Required Error 424 | Excel Programming | |||
424 Object required error | Excel Programming | |||
Object Required Error | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming |