Hallo,
ich mach folgendes:
1. CGI-Wert lesen:
Function getCGIWert(sQuery_string As String, sFeld As String) As String
'Holt Werte aus Querystring
' Bsp: s = getCGIWert("..?openDocument&KUN_NAME=Uwe&KUN_ID=4711","KUN_ID")
' liefert String "4711" zurück
' Uwe Schräpler 29.3.01
Dim i As Integer
Dim s As String
sFeld= sFeld + "="
i = Instr(1, squery_string, sfeld)
If i > 0 Then
s= Mid$(squery_string, i + Len(sfeld))
i = Instr(1, s, "&")
If i > 0 Then s = Left(s,i - 1)
End If
getCGIWert = s
End Function
und um strings zu ersetzen:
Function replaceSubstring(orgstr As String,substr As String,repstr As String) As String
'Ersetzt in <orgstr> alle vorkommenden <substr> durch <repstr>
Dim stelle As String
Dim lensubstr As Long
replaceSubstring=orgstr
lensubstr=Len(substr)
stelle= Instr(replaceSubstring, substr)
Do While stelle <> 0
replaceSubstring = Mid (replaceSubstring,1,stelle -1) & repstr & Mid (replaceSubstring, stelle+lensubstr)
stelle= Instr(replaceSubstring,substr)
Loop
End Function
Ich hoffe, geholfen zu haben...