Help on coercing a range

R

rick

I have a problem with trying to get a range specified the way a subroutine
wants it.

I am trying to .clearcontents of a range in a sheet. Here is the code:
' clear the explainations
Application.Goto reference:="ABC_" & Group_Name & "_Start"
Set StartRange = ActiveCell
' *** function LastRow returns the row number as long
lngEndRow = LastRow
Set EndRange = StartRange.Offset(lngEndRow - StartRange.Row, 0)

Here is the problem. I am getting: an Error 91 Object variable or with block
variable not set.
I am trying to pass the Find_Range function "$A$10:$A$137"
immediate shows that StartRange.address is "$A$10" and the endrange is
"$A$137" (but maybe the quotes really aren't there but show in the
Immediate.

Find_Range("Explainations", Range(StartRange.Address & ":" &
EndRange.Address)).Select
ActiveCell.Offset(1, 0).Select
Selection.ClearContents

Can you please tell me how to do this? Thanks,

rick
 
R

rick

Sorry group, I found the error. I spelled Explanations wrong. The Range
structures are fine.

.... rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top