PaceMedlem sedan juni 20019 024 inlägg Varför i he***te ger detta felmeddelande:
"Ogiltig användning av Null: 'Replace'"
Function htmlSecure(htmlfix)
If (htmlfix = Null) OR (htmlfix = "") OR (Len(htmlfix) <= 0) Then Exit Function
htmlfix = Replace(Trim(htmlfix), "<", "<")
htmlfix = Replace(htmlfix, ">", ">")
htmlfix = Replace(htmlfix, vbCrLf, "<br>")
htmlSecure = htmlfix
End Function
Jag begriper mig inte på Microsoft...
------------------
Peter D
VideMedlem sedan dec. 19998 577 inlägg Du borde nog göra såhär med null:
IsNull(htmlfix)
If IsNull(htmlfix) OR (htmlfix = "") OR (Len(htmlfix) <= 0) Then Exit Function
------------------
Vide rox = new Vide();
rox.learn("C#");
webeye.nu
PaceMedlem sedan juni 20019 024 inlägg Tack Vide!
Men varför funkar inte det andra?
------------------
Peter D
LarsGMedlem sedan dec. 200012 464 inlägg
if [b]isNull(htmlfix)[/b] OR (htmlfix = "") OR (Len(htmlfix) <= 0) Then Exit Function
Alla jämförelser av typ
värde op null
blir alltid falska.
------------------
essentitia preter non sans multiplicandum
PaceMedlem sedan juni 20019 024 inlägg Okej, jag förstår! Tack.
------------------
Peter D