What am I doing wrong? I am getting a typemismatch on
dateBeingBalanced = Range("a" & nrow).SpecialCells(xlCellTypeVisible).Value
from the script below:
dim nrow as long
dim datebeingbalanced as string
dim tasktotalhours as double
With ws
.AutoFilterMode = False
.Range("Bs1:Bs" & .Range("Bs" & Rows.Count).End(xlUp).Row).AutoFilter 1, UserForm1.ticketid.Value
TaskTotalHours = Application.WorksheetFunction.Sum(.Range("I2:I" & .Range("I" & Rows.Count).End(xlUp).Row).SpecialCells(xlCellTypeVisible))
End With
nrow = 2
Do Until Range("a" & nrow).Value = ""
dateBeingBalanced = Range("a" & nrow).SpecialCells(xlCellTypeVisible).Value
This is only the beginning of the script which is why you don't see the end with/loop, etc. but it is stopping on the line I listed above. Any idea why that's giving me a type mismatch?
Bookmarks