Compile error: Expected: end of statement
I am changed my code to read column V to endo or the full worksheet, it was v2:v1000 but sometimes there are more than 1000 rows and I am receiving the compile error. I am not sure who to correct this.
Dim LastRow As Long
LastRow = Cells(Rows.Count, 2).End(xlUp).Row
I am changed my code to read column V to endo or the full worksheet, it was v2:v1000 but sometimes there are more than 1000 rows and I am receiving the compile error. I am not sure who to correct this.
Dim LastRow As Long
LastRow = Cells(Rows.Count, 2).End(xlUp).Row
VBA Code:
ActiveWorkbook.Worksheets("Installation wkg").Sort.SortFields.Add2 Key:=range _
("V2:V" & LastRow).SortOn:= xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal