Dim LastRow As Long
With Workbooks("SampleBook").Sheets("SampleSheet")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
I have been running this code for over a month now. I had no issues. Suddenly, for the past two days, it's throwing the subscript out of range - run time error(9).
Not sure what's going on!
Your help is appreciated :)
Thank you!
Dim wb as workbook Dim ws as Worksheet Set wb = Workbooks("SampleBook") Set ws = wb.Sheets("SampleSheet")as see if that runs.