aspnet-scotland
asked on
Microsoft VBScript runtime (0x800A005E) Invalid use of Null: 'cdbl'
Hi,
I receive the below error message on line 2 of the attached vb script code snippet:
Microsoft VBScript runtime (0x800A005E) Invalid use of Null: 'cdbl'
Do any experts know how I can fix this error? It only seems to flag now and again?
Thanks.
I receive the below error message on line 2 of the attached vb script code snippet:
Microsoft VBScript runtime (0x800A005E) Invalid use of Null: 'cdbl'
Do any experts know how I can fix this error? It only seems to flag now and again?
Thanks.
col_num = col_num + 1
col_sum(col_num) = col_sum(col_num) + sign * cdbl(itm.Value)
if (sign * cdbl(itm.Value)) > 0 then
fontcolor_st = ""
fontcolor_et = ""
else
fontcolor_st = "<font color=red>"
fontcolor_et = "</font>"
end if
Response.Write "<td class=s1d1_ce_r valign=top >" & fontcolor_st & GetYourFormat(sign * cdbl(itm.Value),number_format) & fontcolor_et & "</td>"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried the attached but I still get the error?
if (sign * cdbl(itm.Value)) > 0 OR isNull(sign * cdbl(itm.Value)) then
fontcolor_st = ""
fontcolor_et = ""
else
fontcolor_st = "<font color=red>"
fontcolor_et = "</font>"
end if
I think you have to do a check for "not null" on itm.Value all bu itself first, before you evaluate or do anything else. Just like my first example, make sure itm.Value is not null, then procede with your code.
ASKER
Open in new window