To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=46988 Issue #:|46988 Summary:|range.find() Component:|Spreadsheet Version:|OOo 1.1.4 Platform:|All URL:| OS/Version:|All Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|FEATURE Priority:|P3 Subcomponent:|programming Assigned to:|spreadsheet Reported by:|rjahn1
------- Additional comments from [EMAIL PROTECTED] Thu Apr 7 15:26:07 -0700 2005 ------- MS Windows 2000, OpenOffice 1.1.4 Is there a method for OO spreadsheet cell-range objects similar to the MS Excel VBA range.find()? I wrote a user function in OO Basic for OO spreadsheet to accomplish this purpose. I thought that there might be a cleaner and built-in solution. This built-in method, if existent, has so far eluded me. I have used the work list "range find" to search OO issues for all issue types, all issue statuses, all issue resolutions, api and spreadsheet components, etc. There is no hit for this question. Thanks for help. Ray ' --- MS VBA code Option Explicit ' before MS Excel 2002 (Excel 10.0) version ' range.find() does not work if called from worksheet cells Public Function range_find(wrksht As String, pttn As String) As String Dim usd As Range Dim fnd As Range Set usd = ActiveWorkbook.Worksheets(wrksht).UsedRange Set fnd = usd.Find(pttn, , xlValues, xlWhole, xlByRows, xlNext) If (fnd Is Nothing) Then range_find = "nothing!" Else range_find = fnd.Address End If End Function Sub sub1() MsgBox ("sub1(): " + range_find("sheet1", "tst")) End Sub ' --- MS worksheet content * create a worksheet with name "sheet1" * enter a string "tst" in any cell in "sheet1" worksheet * enter a formula =func1("sheet1", "tst") in any other cell in "sheet1" worksheet * use ctrl+alt+F9 to re-evaluate any time --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]