john-tvh / VBE_Extras

VBE Extras ... extending the VBA editor
https://www.thevbahelp.com/vbe-extras
1 stars 0 forks source link

Make Option Explicit adds new declarations in wrong procedure #16

Closed john-tvh closed 10 months ago

john-tvh commented 10 months ago

Describe the bug Make Option Explicit adds new declarations in wrong procedure when there are many declarations for the 'same name' are added across multiple procedures at once.

To Reproduce Steps to reproduce the behavior:

  1. Activate Module 'dp_GetSelections' in supplied Workbook
  2. Run 'Make Option Explicit'
  3. In the 'Before using Make Option Explicit' dialog, check all 3 checkboxes
  4. In the 'Module or Proc/Prop' dialog, select 'Proc/Prop'
  5. After adding a number of declarations, shows a dialog "an error 'Duplicate declaration in current scope' while compiling ... please fix and try again" ... that scope being the SearchSKUIndexBySearchString() Function

Expected behavior No duplicate declarations.

Screenshots Picture1

Frequency of bug Every time ... the bug is 100% consistent.

Please complete the following information: VBE_Extras v1.4.1.4 [Debug], build 14 Nov 2023 14:20:48 LGF: v2.2.0.0 LGS: v3.1.8.0 LFF: v3.7.2.0 VEH: v20230831.05 .NET Framework 4.8.9181.0 CLR: v4.0.30319 Microsoft Windows 10.0.19045 : X64 Dev device Excel 365 (16.0, 16924, WIN64, VBA7) VBE 7.01.1131 UI Lang: en-US Host: EXCEL.EXE v16.0.16924.20124 Exp: S-GET, S-CCAS, RAM

john-tvh commented 10 months ago

Fixed in release 1.4.2.0