I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Cool ive got it started but im having a lil problem with the code the thing is that ive got 4 combo boxes going across and ive got 4 going down and within the combo boxes ive got 4 numbers i think there 3,7,15, and 31. what i wanna do is i wanna do is the 4 combo boxes going across that needs to add up to 56 so everytime. if choose a number in the first combo box e.g. 15 and in the second combo box number 31 i wanna add that and put it in a text box. i hope i havent lost you but i'll add a picture of what i mean.
and i'll also put the code in what ive done so far some will be wrong coz ive been trying out different methods but non of em work.
Option Explicit
Dim IntNums(4, 4) As Integer
Dim i As Integer
Dim intRow As Integer
Dim intCol As Integer
Private Function SumRow(intArray() As Integer, intRowNum As Integer) As Integer
End Function
Private Function SumCol(intArray() As Integer, intColNum As Integer) As Integer
End Function
Private Sub TransferInputToIntegerGrid(ByRef Grid() As Integer)
End Sub
Private Sub cmdSolve_Click()
Call TransferInputToIntegerGrid(IntNums)
End Sub
Private Sub Form_Load()
For i = 0 To 15
Nums(i).AddItem ("5")
Nums(i).AddItem ("7")
Nums(i).AddItem ("15")
Nums(i).AddItem ("31")
Next i
End Sub
Private Sub Label1_Click()
End Sub
Private Sub lblAnswer_Click()
End Sub
Private Sub Nums_Change(Index As Integer)
For intRow = 0 To 3
For intCol = 0 To 3
IntNums(intRow, intCol) = Val Nums(0).List
End Sub
Private Function SumRowSumRow(intArray() As Integer, intRowNum As Integer) As Integer
For i = 0 To 3
Sum = 0
Sum = Sum + intArray(intRowNum, Col)
Next
SumRow = Sum