26. oktober 2004 - 10:26
Der er
1 kommentar og 1 løsning
Split function til sub
Sub SplitNo(arrDirPhone) Dim arrDirPhone(3) arrDirPhone(0) = Left(txtDirPhone, 2) arrDirPhone(1) = Mid(txtDirPhone, 3, 2) arrDirPhone(2) = Mid(txtDirPhone, 5, 2) arrDirPhone(3) = Mid(txtDirPhone, 7, 2) arrDirPhone = arrDirPhone(0) & " " & arrDirPhone(1) & " " & arrDirPhone(2) & " " & arrDirPhone(3) End Sub SplitNo("22556677")
Annonceindlæg tema
Offentlig digitalisering
Fra effektivisering til digital suverænitet. Hvordan skaber det offentlige en digital fremtid med AI, sikkerhed og kontrol i centrum?
26. oktober 2004 - 10:50
#1
Dette virker heller ikke. Hva er feil? Sub SplitNo(strInput) Dim arrDirPhone(3) arrDirPhone(0) = Left(strInput, 2) arrDirPhone(1) = Mid(strInput, 3, 2) arrDirPhone(2) = Mid(strInput, 5, 2) arrDirPhone(3) = Mid(strInput, 7, 2) strInput = arrDirPhone(0) & " " & arrDirPhone(1) & " " & arrDirPhone(2) & " " & arrDirPhone(3) SplitNo = strInput End Sub
26. oktober 2004 - 10:58
#2
Sorry blandet Sub og function Function SplitNo(strInput) Dim arrDirPhone(3) arrDirPhone(0) = Left(strInput, 2) arrDirPhone(1) = Mid(strInput, 3, 2) arrDirPhone(2) = Mid(strInput, 5, 2) arrDirPhone(3) = Mid(strInput, 7, 2) strInput = arrDirPhone(0) & " " & arrDirPhone(1) & " " & arrDirPhone(2) & " " & arrDirPhone(3) SplitNo = strInput End Function
Kurser inden for grundlæggende programmering