Error checking for NULL in VBScript

bradfly

New Member
I have the following VBScript in a Classic ASP page:\[code\]function getMagicLink(fromWhere, provider) dim url url = "magic.asp?fromwhere=" & fromWhere If Not provider is Nothing Then ' Error occurs here url = url & "&provider=" & provider End if getMagicLink = "<a target='_blank' href='" & url & "'>" & number & "</a>"end function\[/code\]I keep getting an "Object Required" error messager on the line that says \[code\]If Not provider Is Nothing Then\[/code\].Either the value is NULL, or it's not NULL, so why am I getting this error?Edit: When I invoke the object, I pass in either NULL, or I pass in a string.
 
Top