Modify ↓
#2988 closed Bug (Fixed)
_Excel_RangeFind fails without throwing error when searching inactive book with string as Range
| Reported by: | Owned by: | water | |
|---|---|---|---|
| Milestone: | 3.3.13.21 | Component: | Standard UDFs |
| Version: | 3.3.12.0 | Severity: | None |
| Keywords: | excel com _excel_rangefind | Cc: |
Description
Using _Excel_RangeFind on an inactive workbook with a string as the range fails the search, but does not return 0 or throw an error. Passing a Range object or having the sheet be active works as expected.
Looking in Excel.au3, the culprit appears to be in this If statement:
If $vRange = Default Then $bSearchWorkbook = True $oSheet = $oWorkbook.Sheets(1) $vRange = $oSheet.UsedRange ElseIf IsString($vRange) Then $vRange = $oWorkbook.Parent.Range($vRange) If @error Then Return SetError(3, @error, 0) EndIf
$oWorkbook.Parent.Range($vRange) should be changed to $oWorkbook.Sheets(1).Range($vRange) instead.
Attachments (1)
Change History (5)
by , 11 years ago
| Attachment: | rangefindBug.au3 added |
|---|
comment:1 by , 11 years ago
| Component: | AutoIt → Standard UDFs |
|---|
comment:2 by , 11 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:3 by , 11 years ago
| Milestone: | → 3.3.13.21 |
|---|---|
| Resolution: | → Fixed |
| Status: | accepted → closed |
Fixed by revision [11252] in version: 3.3.13.21
Note:
See TracTickets
for help on using tickets.

Minimal file to show the nature of the bug, as tested with Excel 2007.