VB6 question

2008-02-29 10:42 am
vb有冇類似copy既function??

如果我想read到每個字既letter/character係咩

應該點做?

回答 (3)

2008-03-02 3:40 am
✔ 最佳答案
Dim strTest As String
Dim i As Integer
strTest = “Hello,World“
MsgBox “String length=“ & Len(strTest), vbInformation, strTest
For i = 1 To Len(strTest)
’開始讀取文字
MsgBox “The “ & i & StNdRdTh(i) & “ character is “ & Mid$(strTest, i, 1)
Next
’自己寫左個Function轉th、st果D
Function StNdRdTh(n As Integer) As String
If n = 11 Or n = 12 Or n = 13 Then
StNdRdTh = “th“
Exit Function
Else
Select Case Right$(CStr(n), 1)
Case 1
StNdRdTh = “st“
Case 2
StNdRdTh = “nd“
Case 3
StNdRdTh = “rd“
Case Else
StNdRdTh = “th“
End Select
End If
End Function
2008-02-29 6:34 pm
你copy的意思是什麼地方copy到那裡???
2008-02-29 12:24 pm
你可以將字讀進變數內,唔明點解要copy,是否要paste在其他地方﹖


收錄日期: 2021-04-25 20:33:46
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080229000051KK00266

檢視 Wayback Machine 備份