I have a webpage that rotates banners. About one page views in 10 produces the following error:<BR><BR>Microsoft VBScript runtime error &#039 800a0009&#039<BR>Subscript out of range: &#039count&#039<BR>/banners/banner.asp, line 115<BR><BR>If you refresh the page, the error goes away. The code that produces this error is below:<BR><BR><BR>94: &#039Randomly pick a weight<BR>95: randomize<BR>96:<BR>97: Dim randNum<BR>98: randNum = CInt(rnd * total) + 1<BR>99:<BR>100: Dim count<BR>101: count = 0<BR>102: total = 0<BR>103:<BR>104: for i = LBound(records) to UBound(records)<BR>105: total = total + banInfo(i,bannerWeight)<BR>106: if randNum &#060;= total then<BR>107: i = UBound(records)<BR>108: else<BR>109: count = count + 1<BR>110: end if<BR>111: next<BR>112:<BR>113:<BR>114: &#039Print out HREF and IMG<BR>115: Response.Write("&#060;CENTER&#062;&#060;A<BR>HREF= ""http://www.grannymail.com/banners/adredir.asp?" &<BR>banInfo(count,bannerID) & """ TARGET=""_blank""<BR>onMouseOver=""window.status=& #039Please support this website by visiting our<BR>sponsor!&#039; return true"" onMouseOut=""window.status=&#039 &#039; return true""&#062;")<BR><BR><BR>I am using the Banner rotation software located on the 4guysfromrolla site. The entire article is located at:<BR>http://www.4guysfromrolla.com/webtech/061399-4.shtml<BR>(with the problem asp linked at the bottom of the page)<BR><BR>Let me know if you see a quick solution!<BR><BR>Thanks very, very much indeed!<BR><BR>Edward