Hallo Leute,
ich will einen String in Teilstrings aufspalten. Allerdings kriege ich dann die Fehlermeldung "Objekt erforderlich". Was mache ich falsch.
Hier mein Code:
Sub tokenizeErrors()
'
'this helps to tokenize and format the errors message from db
'
Dim errors() As String
errMessage = ""
x = "C"
y = 5
cell = x + CStr(y)
Range(cell).Select
Do While ActiveCell.Value <> ""
errMessage = ActiveCell.Value
errors = Split(errMessage, "] [", , CompareMethod.Text) 'HIER KOMMT DER FEHLER BEIM DEBUGGEN!!!
ActiveCell.Formula = "CONCATINATE('" & "errors(1)" & ")"
y = y + 1
Range(cell).Select
cell = x + CStr(y)
Loop
End Sub
|