VB6: String parsen

Hallo…
Ich hab eine kleine Syntax-Frage zu Visual Basic 6. Zwar geht es darum einen String im Format
„Item1=Value1; Item2=Value2; Item3=Value3“ in einen Record (type) zu kopieren. Die Anzahl der Items und deren Typen sind dabei bekannt.
z.B.:

typedef
Item1 As Long
Item2 As String
Item3 As Date
endtype

oder wie das geht :smile:

dim sa() as string, ss() as string
dim mytype as type, mystring as string

mystring="Item1=11; Item2=Test; Item3=01.01.1990"

sa()=split(mystring,";")

ss()=split(sa(0),"=")
mytype.item1=clng(trim(ss(1)))

ss()=split(sa(1),"=")
mytype.item1=trim(ss(1))

ss()=split(sa(2),"=")
mytype.item1=cdate(trim(ss(1)))

cu, holli

[Bei dieser Antwort wurde das Vollzitat nachträglich automatisiert entfernt]