Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
EDIT ... Disregard, brain back from lunch and problem identified and resolved.
I am receiving an error with the line in red.
"Object variable or With Block variable not set."
ar = 28
rw_ar_start = 1
rw_ar_end = 28
I am imagining this to be an oversight on my part, but I hope someone is able to point it out for me.
Rich (BB code):
Dim amr_range As Range
Dim pmr_range As Range
Dim rw_ar_start As Integer
Dim rw_ar_end As Integer
Dim rw_pr_start As Integer
Dim rw_pr_end As Integer
Dim temp_ws As Worksheet
Dim ar, pr As Integer
Set temp_ws = Workbooks("schedule.csv").Worksheets("temp_ws")
l_temp_lrow = temp_ws.Cells(temp_ws.Rows.count, "M").End(xlUp).row
ar = WorksheetFunction.CountIf(temp_ws.Range("L:L"), "act")
pr = WorksheetFunction.CountIf(temp_ws.Range("L:L"), "pass")
'active range
rw_ar_start = WorksheetFunction.Match("act", temp_ws.Range("L1:L" & l_temp_lrow), 0) 'row number of the first "act"
rw_ar_end = rw_ar_start - 1 + ar
set amr_range = temp_ws.Range(temp_ws.Cells(rw_ar_start, 13), temp_ws.Cells(rw_ar_end, 16))
I am receiving an error with the line in red.
"Object variable or With Block variable not set."
ar = 28
rw_ar_start = 1
rw_ar_end = 28
I am imagining this to be an oversight on my part, but I hope someone is able to point it out for me.
Last edited: