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
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