Modify

#2988 closed Bug (Fixed)

_Excel_RangeFind fails without throwing error when searching inactive book with string as Range

Reported by: TheAppleFreak <theapplefreak@…> 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)

rangefindBug.au3 (2.7 KB ) - added by TheAppleFreak <theapplefreak@…> on Feb 13, 2015 at 8:27:05 PM.
Minimal file to show the nature of the bug, as tested with Excel 2007.

Download all attachments as: .zip

Change History (5)

by TheAppleFreak <theapplefreak@…>, on Feb 13, 2015 at 8:27:05 PM

Attachment: rangefindBug.au3 added

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

comment:1 by water, on Mar 11, 2015 at 10:32:40 PM

Component: AutoItStandard UDFs

comment:2 by water, on Mar 12, 2015 at 2:03:54 PM

Owner: set to water
Status: newaccepted

comment:3 by water, on Mar 22, 2015 at 5:21:59 PM

Milestone: 3.3.13.21
Resolution: Fixed
Status: acceptedclosed

Fixed by revision [11252] in version: 3.3.13.21

comment:4 by water, on Mar 22, 2015 at 5:22:28 PM

Fixed by revision [11253] in version: 3.3.13.21

Modify Ticket

Action
as closed The owner will remain water.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.