kylefoley76
Well-known Member
- Joined
- Mar 1, 2010
- Messages
- 1,553
I'm getting the error in the title of the thread and VBA highlights the time_lastcell2 as the culprit.
Code:
Dim first_cell As Integer
Dim time2 As Worksheet
Set time2 = ActiveWorkbook.Sheets("time")
Dim lastday As Date, lastday_time As Date
time_lastcell2 As Integer
With time2
time_lastcell2 = .Range("e65000").End(xlUp).Row
End With
lastday_time = time2.Range("e" & time_lastcell).Address
'Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
With ActiveSheet
first_cell = .Range("c65000").End(xlUp).Row
lastday = .Range("b" & first_cell).Address
[more code]