Apache OpenOffice (AOO) Bugzilla – Issue 44469
basic: Instr Function behaves
Last modified: 2005-04-05 15:17:00 UTC
Hi, the basic InStr() Function seems to be different from SO 5.2 ... Is it a bug or new feature ? regards Oliver -- OPTION EXPLICIT Sub testInstr() Dim sSearch as String Dim sString as String sString = "Sheet_X" ' Result 1 sSearch = "Sheet_X" MsgBox InStr(1, sString, sSearch, 0) ' Result 0 sSearch = "Hello" MsgBox InStr(1, sString, sSearch, 0) ' Result 6 sSearch = "_X" MsgBox InStr(1, sString, sSearch, 0) ' Result 1 in OO 1.1.4 / OO 2.0 ??? ' In SO 5.2 it was 0 ... sSearch = "" MsgBox InStr(1, sString, sSearch, 0) End Sub
Andreas, was the change intended?
The change was intended. Instr behaves VB compatible now.
Closed