Vba script in office xp (ned)
Klein functietje om wat output te formatten wat in een html pagina komt. Alleen hij blijft steeds blerren dat mn eerste regel niet goed is, want de sub of functie is niet gedefinieerd. Beetje vaag toch? Staat toch helemaal goed zo
. Heb al geprobeerd private ervoor te zetten/weg te halen, nix werkt
.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| Private Function Specialkars(aStr As String)
If Len(aStr) > 0 Then
strFind = char(38) 'ampersand
strReplace = "&"
aStr = Replace(aStr, strFind, strReplace)
strFind = char(34) 'dubbele quote
strReplace = """
aStr = Replace(aStr, strFind, strReplace)
strFind = char(39) 'enkele quote
strReplace = "'"
aStr = Replace(aStr, strFind, strReplace)
strFind = char(60) ' <
strReplace = "<"
aStr = Replace(aStr, strFind, strReplace)
strFind = char(62) ' >
strReplace = ">"
aStr = Replace(aStr, strFind, strReplace)
strFind = char(43) ' +
strReplace = "$#043;"
aStr = Replace(aStr, strFind, strReplace)
Specialkars = aString
End If
End Function |
Klein functietje om wat output te formatten wat in een html pagina komt. Alleen hij blijft steeds blerren dat mn eerste regel niet goed is, want de sub of functie is niet gedefinieerd. Beetje vaag toch? Staat toch helemaal goed zo
"Then there was the man who drowned crossing a stream with an average depth of six inches."