Modify ↓
Opened on Feb 13, 2015 at 8:26:04 PM
Closed on Mar 22, 2015 at 5:21:59 PM
Last modified on Mar 22, 2015 at 5:22:28 PM
#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 , on Feb 13, 2015 at 8:27:05 PM
| Attachment: | rangefindBug.au3 added |
|---|
comment:1 by , on Mar 11, 2015 at 10:32:40 PM
| Component: | AutoIt → Standard UDFs |
|---|
comment:2 by , on Mar 12, 2015 at 2:03:54 PM
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:3 by , on Mar 22, 2015 at 5:21:59 PM
| 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.