Click here to Skip to main content
15,922,309 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: What does .net stand for? Pin
rwestgraham22-Aug-05 10:48
rwestgraham22-Aug-05 10:48 
GeneralRe: What does .net stand for? Pin
toxcct22-Aug-05 20:28
toxcct22-Aug-05 20:28 
Generalsmall problemo Pin
DanChin22-Aug-05 0:53
DanChin22-Aug-05 0:53 
GeneralRe: small problemo Pin
Mandar Patankar22-Aug-05 6:11
Mandar Patankar22-Aug-05 6:11 
GeneralRe: small problemo Pin
Anonymous26-Aug-05 1:00
Anonymous26-Aug-05 1:00 
Generalintelligent datagrid sense to enter letter Pin
pantaloo21-Aug-05 22:50
pantaloo21-Aug-05 22:50 
GeneralRe: intelligent datagrid sense to enter letter Pin
rudy.net22-Aug-05 18:10
rudy.net22-Aug-05 18:10 
GeneralArrayList Problems Pin
DJ1UK21-Aug-05 21:49
DJ1UK21-Aug-05 21:49 
Hi All,

I have the following code to create an array list

[code]
objConn.Open()
Dim Scores as ArrayList
Dim s as Integer
s=0
Scores=New ArrayList
Dim strSQL4 as String = "SELECT CriteriaID, Score, ScenarioID, UserID As SumScore FROM tblMatrix"
Dim objCmd4 as New OleDbCommand(strSQL4, objConn)
Dim objDR4 as OleDbDataReader
objDR4 = objCmd4.ExecuteReader()
While objDR4.Read()
Scores.add(objDR4("Score"))
s=s+1
End While
'Write Out Contents of Array (Sum of Scores)
For s = 0 To Scores.Count - 1
Response.Write(Scores.Item(s) & "
")
Next
DataBind()
objDR4.Close()
objConn.Close()
[/code]

And a similar one to set up an ArrayList called Conf.

I then have the following code to multiply the values in the arraylists together:

[code]
Dim x as Integer
For s=0 to Scores.Count - 1
x = (Scores.Item(s)) * (Conf.Item(c))
Next
[/code]

But I recieve the following error:

[code]
Index was out of range.

Line: (Conf.Items(c))
[/code]

What is wrong with the code and how do I fix this?

Thanks

DJ
GeneralRe: ArrayList Problems Pin
Steve Pullan21-Aug-05 22:14
Steve Pullan21-Aug-05 22:14 
GeneralRe: ArrayList Problems Pin
DJ1UK21-Aug-05 22:17
DJ1UK21-Aug-05 22:17 
GeneralRe: ArrayList Problems Pin
Steve Pullan21-Aug-05 22:48
Steve Pullan21-Aug-05 22:48 
GeneralVC++ API interface Pin
rushing21-Aug-05 21:42
rushing21-Aug-05 21:42 
GeneralRe: VC++ API interface Pin
MohammadAmiry22-Aug-05 0:38
MohammadAmiry22-Aug-05 0:38 
GeneralRe: VC++ API interface Pin
rudy.net22-Aug-05 18:18
rudy.net22-Aug-05 18:18 
Generaldate and month format Pin
ybasha21-Aug-05 21:01
ybasha21-Aug-05 21:01 
GeneralRe: date and month format Pin
Steve Pullan21-Aug-05 22:06
Steve Pullan21-Aug-05 22:06 
GeneralRe: date and month format Pin
ybasha22-Aug-05 0:27
ybasha22-Aug-05 0:27 
GeneralRe: date and month format Pin
_mubashir22-Aug-05 4:32
_mubashir22-Aug-05 4:32 
GeneralRe: date and month format Pin
ybasha23-Aug-05 0:25
ybasha23-Aug-05 0:25 
Generaldate and month format Pin
ybasha21-Aug-05 20:59
ybasha21-Aug-05 20:59 
GeneralRe: date and month format Pin
OK_Jojo23-Aug-05 0:06
OK_Jojo23-Aug-05 0:06 
Generalexport treeview control Pin
BORN...again!21-Aug-05 20:46
BORN...again!21-Aug-05 20:46 
QuestionConverting UserForms to VB Forms? Pin
Steve Pullan21-Aug-05 20:26
Steve Pullan21-Aug-05 20:26 
AnswerRe: Converting UserForms to VB Forms? Pin
Dave Kreskowiak22-Aug-05 5:03
mveDave Kreskowiak22-Aug-05 5:03 
GeneralRe: Converting UserForms to VB Forms? Pin
Steve Pullan22-Aug-05 14:02
Steve Pullan22-Aug-05 14:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.