I am debugging some Project 2010 add-ins. One of them hass a Type Mismatch error (compiling error) on a subroutine by highlighting the the first line of the sub's definition (for example, "Sub ThisIsSubroutine()" is highlighted). For some reason,part of an array declaration is highlighted as though it was manually highlighted: ReDim vArray(fgrs.recordcount-1, 1) [the '-' is highlighted]. This add-in worked fine when the file was on another computer. Could ADODB.recordset have some issue on my computer?
This is the same file that was on both computers. Nothing substantial should be different between them, code- and module-wise.
Note: I should also point out that the recordCount property is used in the code. There's a greater-than-0 check performed on it before the error. So recordCount is a value that can be read, yet no operations can be done on it? Could it also be a Windows 7 issue?