Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 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@…> 9 years ago.
Minimal file to show the nature of the bug, as tested with Excel 2007.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by TheAppleFreak <theapplefreak@…>

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

comment:1 Changed 9 years ago by water

  • Component changed from AutoIt to Standard UDFs

comment:2 Changed 9 years ago by water

  • Owner set to water
  • Status changed from new to accepted

comment:3 Changed 9 years ago by water

  • Milestone set to 3.3.13.21
  • Resolution set to Fixed
  • Status changed from accepted to closed

Fixed by revision [11252] in version: 3.3.13.21

comment:4 Changed 9 years ago by water

Fixed by revision [11253] in version: 3.3.13.21

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain water.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.