I have created this function that works well:
Function DividiNomeDaWeb(NameLinkTo, PerCosa)
Dim intSizNomeWeb, intSizNome, intSizWeb
intSizNomeWeb = split(NameLinkTo, PerCosa)
intSizNome = intSizNomeWeb(0)
intSizWeb = intSizNomeWeb(1)
DividiNomeDaWeb = "<a href=""http://www."& intSizWeb &""" class=""linksmalltext"">"&intSizNome&"</a>"
End Function
|
This function split a text in database after a variable "PerCosa".
An example:
In the database i have:siteweb,web.it
so I call the function in this way:
" & DividiNomeDaWeb (" & DividiNomeDaWeb (objSizRs("Collaboration"), ",") & ", ",") & "
The function split my string in
siteweb and web.it.
In case that my objSizRs("Collaboration") is empty, split operation print an error!!!
So I would like to put an if that check if my variable is empty and in this case show a message.
Like:
Function DividiNomeDaWeb(NameLinkTo, PerCosa)
If NameLinkTo = "" Then
DividiNomeDaWeb = "testo...."
Else
Dim intSizNomeWeb, intSizNome, intSizWeb
intSizNomeWeb = split(NameLinkTo, PerCosa)
intSizNome = intSizNomeWeb(0)
intSizWeb = intSizNomeWeb(1)
DividiNomeDaWeb = "<a href=""http://www."& intSizWeb &""" class=""linksmalltext"">"&intSizNome&"</a>"
End If
End Function
|
But doesn't work well!!! Why? I don't know how use UBound metod

Edited by simoza - 01 March 2005 at 1:44pm