the reason is that you are defining a variable local to that block
ie the variable arrReportList is local to your if or else block
try something like this
Dim arrReportList (not sure how you do it in VB but in c# you would do it
this way string[] arrReportList
if Len(request.querystring("rpt")) > 0 then
arrReportsList =split(request.querystring("rpt"),",")
else
Dim arrReportsList =split(Session("rpt"),",")
end if
vPagecount = Ubound(arrReportsList) + 1 '<== error on this line
Should be fine now... hth
--
Regards,
HD
Once a Geek.... Always a Geek
"TJS" <no****@here.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
it says the name is not declared, but it is
how can I fix this ?
Compiler Error Message: BC30451: Name 'arrReportsList' is not declared.
==========================
if Len(request.querystring("rpt")) > 0 then
Dim arrReportsList =split(request.querystring("rpt"),",")
else
Dim arrReportsList =split(Session("rpt"),",")
end if
vPagecount = Ubound(arrReportsList) + 1 '<== error on this line