john-tvh / VBE_Extras

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

Error is reported when a 'match for literal value at cursor' is on line 1 of a Module #22

Closed john-tvh closed 8 months ago

john-tvh commented 9 months ago

Describe the bug Error is reported when a 'match for literal value at cursor' is on line 1 of a Module (ArgumentException)

To Reproduce Steps to reproduce the behavior:

  1. Add code with a string literal on line 1 of a Module eg
Const test As String = "abc"

Sub Foo()
    Debug.Print "abc"
End Sub

... note the Const line is line 1

  1. Click on "abc" in the Debug.Print line
  2. Select menu option to get 'Matches for literal value at cursor'
  3. See error

Expected behavior No such error, dialog is shown listing matches for "abc".

Frequency of bug Every time the above scenario is replicated.

Logs Argument_231211_083113_206_Excel.txt

Please complete the following information: VBE_Extras v1.4.3.0 [Debug], build 11 Dec 2023 12:48:23 LGF: v2.2.0.0 LGS: v3.1.10.0 LFF: v4.0.1.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, 17029, WIN64, VBA7) VBE 7.01.1131 UI Lang: en-US (menu names English) Host: EXCEL.EXE v16.0.17029.20068 Exp: S-GET, S-CCAS, RAM OA: none

john-tvh commented 8 months ago

Fixed in release 1.4.4.0