# Re: 请问: 如何得知 目前由标是停在 TextBox 的第几行 ? (无内文) Thanks much !!!

Posted by 小琳 on August 20, 1999 at 20:33:36:

In Reply to: 请问: 如何得知 目前由标是停在 TextBox 的第几行 ? (无内文) Thanks much !!! posted by Albert on August 20, 1999 at 14:48:24:

: !!

:::小女子写了一个小程式，希望能解决您的问题!!!
Option Explicit

Private Sub Command1_Click()
Dim i As Integer, j As Integer
Dim temp As String
i = 1
j = 1
Do While i < Text1.SelStart
temp = Mid(Text1.Text, i, 1)
If temp = Chr(10) Then
j = j + 1
End If
i = i + 1
Loop
MsgBox "第" & j & "行"
End Sub

Follow Ups:

- Thanks your help, I have another method for this problem ! (有兴趣请入内) Albert 11:30:13 8/21/99 (0)