NessPJ
Active Member
- Joined
- May 10, 2011
- Messages
- 420
- Office Version
- 365
Hello all,
Recently i have migrated a lot of systems from Office 2010 to 2016.
All of my reports are working, but one is persistently giving me a Type mismatch error now.
I debugged the code but i really can't detect what is going wrong.
The exact error is: Run-time error '-2147352571 (800200005)': Type mismatch.
Here's the code with the error:
I underlined the segment of the code that the debugger points to.
Recently i have migrated a lot of systems from Office 2010 to 2016.
All of my reports are working, but one is persistently giving me a Type mismatch error now.
I debugged the code but i really can't detect what is going wrong.
The exact error is: Run-time error '-2147352571 (800200005)': Type mismatch.
Here's the code with the error:
Rich (BB code):
Dim LastRowActiviteit, LastRowTag As String
LastRowTag = ThisWorkbook.Sheets("Masterdata").Range("R101").End(xlUp).Row
Dim Row As Integer
With Registratie.Tag1
For Row = 5 To LastRowTag
.AddItem Sheets("Masterdata").Range("R" & Row)
Next Row
End With
With Registratie.Tag2
For Row = 5 To LastRowTag
.AddItem Sheets("Masterdata").Range("T" & Row)
Next Row
End With
I underlined the segment of the code that the debugger points to.