Rubberduck: Broken test - ImplicitActiveSheetReference

Created on 19 Apr 2021  路  3Comments  路  Source: rubberduck-vba/Rubberduck

Version 2.5.2.5814
OS: Microsoft Windows NT 10.0.19042.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.13901.20400
Host Executable: EXCEL.EXE

The ImplicitActiveSheetReference test seems to be broken.

On the following code:

With shNotOK
   .Range(.Range("A2").Resize(UBound(arrNotOK, 1), UBound(arrNotOK, 2)).Address).Formula = arrNotOK
End With

where shNotOK is

Set shNotOK = ActiveWorkBook.Sheets("NotOK")

and arrNotOK is two-dimentional array with some data

this test results two warnings, one for each .Range instance and according to the test help page, it should not.

bug

All 3 comments

Noticed some more "false alarms" for code like this one:

sh.Range(....

where sh is variable, pointing to some worksheet.

Thanks for reporting this.

The cause of the issue is the change from the referenced commit. It will likely occur for all calls to the members on variables of type Excel.Worksheet.

Build 5816 seems to work as it should. Nice work! :)

BTW, I like the new splash screen. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChrisBrackett picture ChrisBrackett  路  3Comments

retailcoder picture retailcoder  路  3Comments

ThunderFrame picture ThunderFrame  路  3Comments

bclothier picture bclothier  路  3Comments

susnick picture susnick  路  3Comments