Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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@…> 11 years ago.
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@…>, 11 years ago

Attachment: rangefindBug.au3 added

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

comment:1 by water, 11 years ago

Component: AutoItStandard UDFs

comment:2 by water, 11 years ago

Owner: set to water
Status: newaccepted

comment:3 by water, 11 years ago

Milestone: 3.3.13.21
Resolution: Fixed
Status: acceptedclosed

Fixed by revision [11252] in version: 3.3.13.21

comment:4 by water, 11 years ago

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.