VBA專家的結尾處,刪除信件,Excel的VBA函數的字符串
我希望建立一個函數,它會從一個字符串變量刪除最後一個字母[A-Z]。
例如:
Sub Example()
Dim MyString() as string
...
ReDim Preserve MyString(3)
MyString(1) = "ABC345A"
MyString(2) = "DEFG6789BC"
MyString(3) = "AHIL2431LTR"
MyString(1) = RemLetters(MyString(1))
MyString(2) = RemLetters(MyString(2))
MyString(3) = RemLetters(MyString(3))
...
...
End Sub
Function RemLetters(MyString)
???
End Function
...
我期待函數返回:
MyString(1) = "ABC345"
MyString(2) = "DEFG6789"
MyString(3) = "AHIL2431"
因此,所有的信件達第一個數字應被刪除...
乾杯, Andy
並且你累了什麼嗎? – Plirkee