[vba] sub of functie niet gedefinieerd

Pagina: 1
Acties:
  • 168 views sinds 30-01-2008

  • Tom-my
  • Registratie: November 2000
  • Laatst online: 21-05 16:08

Tom-my

w03iz0rz

Topicstarter
Vba script in office xp (ned)

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 = "&lt;"
    aStr = Replace(aStr, strFind, strReplace)
    
    strFind = char(62)  ' >
    strReplace = "&gt;"
    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 :S. Heb al geprobeerd private ervoor te zetten/weg te halen, nix werkt :S.

"Then there was the man who drowned crossing a stream with an average depth of six inches."


  • Tom-my
  • Registratie: November 2000
  • Laatst online: 21-05 16:08

Tom-my

w03iz0rz

Topicstarter
%$%^%^ soz voor deze post, probleem gevonden

(char moet uiteraard chr zijn |:( )

"Then there was the man who drowned crossing a stream with an average depth of six inches."


  • whoami
  • Registratie: December 2000
  • Laatst online: 23:31
Dicht dan.

https://fgheysels.github.io/


Dit topic is gesloten.