GreenyMcDuff
Active Member
- Joined
- Sep 20, 2010
- Messages
- 313
Hi All,
I have written the following code:
But keep getting an "application-defined or object-defined error".
I'm not entirely sure what this means, but I am pretty sure the syntax is incorrect.
Would appreciate your expert knowledge
many thanks
Chris
I have written the following code:
Code:
Dim i As Long, LastRow As Long
Dim TaskCol As Range, LucyCol As Range
Dim beforeArray As Variant
With ActiveSheet
Set TestCol = .Range("1:1").Find("Task Type", LookAt:=xlWhole)
Set LucyCol = .Range("1:1").Find("Task Type Lucy", LookAt:=xlWhole)
[COLOR="Red"]LastRow = .Range(TestCol & Rows.Count).End(xlUp).Row[/COLOR]
But keep getting an "application-defined or object-defined error".
I'm not entirely sure what this means, but I am pretty sure the syntax is incorrect.
Would appreciate your expert knowledge
many thanks
Chris