Du borde nog göra såhär med null:
IsNull(htmlfix)
If IsNull(htmlfix) OR (htmlfix = "") OR (Len(htmlfix) <= 0) Then Exit Function
4 svar · 236 visningar · startad av Pace
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...
Du borde nog göra såhär med null:
IsNull(htmlfix)
If IsNull(htmlfix) OR (htmlfix = "") OR (Len(htmlfix) <= 0) Then Exit Function
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.
Okej, jag förstår! Tack.