10个回答
展开全部
With Text1
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了
展开全部
With Text1
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
With Text1
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
With Text1
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了(来自网络)
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
上面的代码演示了,取得文本框中,光标所在的行和列,你将其显示到statusbar中就可以了(来自网络)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
With Text1
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
试试这段代码
Col = UBound(Split(Left(.Text, .SelStart), vbCrLf))
If Col < 0 Then Col = 0
If .SelStart > 0 Then
Row = .SelStart - InStrRev(.Text, vbCrLf, .SelStart) + IIf(Col = 0, 1, 0)
Else
Row = 1
End If
Col = Col + 1
? "行:" & Col & " 列:" & Row
End With
试试这段代码
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询