0

I have the following code:

Set rFinder = wkEnrollment.Range("EnrollmentIDs")  
With Range(rFinder)
    Set LastCell = .Cells(.Cells.Count)
End With

It errors when I do my With Range(rFinder) line. rFinder is dim'd as a Range. The error is:

Method 'Range' of object '_Global' failed

I am not sure of the syntax on this?

1 Answer 1

1

Since rFinder is already a Range object you should simply use:

Set rFinder = wkEnrollment.Range("EnrollmentIDs")  
With rFinder
    Set LastCell = .Cells(.Cells.Count)
End With
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.