techfanatic
New Member
- Joined
- Jun 30, 2008
- Messages
- 21
Hi Guys,
I'm complete stuck with this. My With statement wouldn't accept my range variable. It keeps on throwing Error 1004. Any help is be appreciated.
If I replace
with the code below, it works
A portion of the code
Thank you!
I'm complete stuck with this. My With statement wouldn't accept my range variable. It keeps on throwing Error 1004. Any help is be appreciated.
If I replace
Code:
With Range(findBlankSupRange)
with the code below, it works
Code:
With wsData.Range("B2:B" & lastAgentRow)
A portion of the code
Code:
Dim wb As Workbook
Dim wsData As Worksheet
Dim findBlankSupRange As Range
Dim lastAgentRow as Integer
Set wb = ThisWorkbook
Set wsData = wb.Worksheets("Data")
lastAgentRow = wsData.Range("C65536").End(xlUp).Row
Set findBlankSupRange = wsData.Range("B2:B" & lastAgentRow)
With Range(findBlankSupRange) 'I'm getting error 1004 on this line (Excel 2010)
Set lastCell = .Cells(.Cells.Count)
End With
Thank you!