LibreOffice 7.3 Help
๋ค๋ฅธ ๋ฌธ์์ด ๋ด์์์ ๋ฌธ์์ด ์์น๋ฅผ ๊ตฌํฉ๋๋ค.
Instr ํจ์๋ ์ผ์นํ๋ ๋ฌธ์์ด์ด ๋ฐ๊ฒฌ๋ ์์น๋ฅผ ๊ตฌํฉ๋๋ค. ๋ฌธ์์ด์ด ๋ฐ๊ฒฌ๋์ง ์์ ๊ฒฝ์ฐ ์ด ํจ์๋ 0์ ๊ตฌํฉ๋๋ค.
InStr ([Start As Integer,] Text1 As String, Text2 As String[, Compare])
Integer
Start: A numeric expression that marks the position in a string where the search for the specified substring starts. If you omit this parameter, the search starts at the first character of the string. The minimum allowed value is 1. The maximum allowed value is 2,147,483,648.
Text1: ๊ฒ์ํ ๋ฌธ์์ด์ด ํฌํจ๋ ๋ฌธ์์ด ์์ ๋๋ค.
Text2: ๊ฒ์ํ ๋ฌธ์์ด ์์ ๋๋ค.
Compare: ๋น๊ต ์ ํ์ ์ง์ ํ๋ ์ ํ์ ์ซ์ ์์ ๋๋ค. ์ด ๋งค๊ฐ ๋ณ์๋ 0 ๋๋ 1์ด ๋ ์ ์์ต๋๋ค. ๊ธฐ๋ณธ๊ฐ 1์ ๋/์๋ฌธ์๋ฅผ ๊ตฌ๋ถํ์ง ์๋ ํ ์คํธ ๋น๊ต๋ฅผ ์ง์ ํฉ๋๋ค. ๊ฐ 0์ ๋/์๋ฌธ์๋ฅผ ๊ตฌ๋ถํ๋ ์ด์ง ๋น๊ต๋ฅผ ์ง์ ํฉ๋๋ค.
To avoid a run-time error, do not set the Compare parameter if the first optional parameter is omitted.
Sub ExamplePosition
Dim sInput As String
Dim iPos As Integer
sInput = "Office"
iPos = Instr(sInput,"v")
Print iPos
End Sub