Im trying to create a 7 segment display for a project in visual basic 2005 express edition. I have a 2 dimentional boolean which stores the values of each of the segments for a certain display. I have written a case statement for the first display and would like to use it for the other displays instead of having to copy the code. I have tried everything I can think of but can't get it to pass the name of the boolean array im trying to set the values to from my main code to the procedure. Here is the code im passing:
The "VisPPL" is the name of the boolean array im trying to set the values to.
Here is the code from the start of my procedure my procedure:
Ive tried using a string where the ???? is as the datatype for the name of the boolean array and im simply trying to get the VarName to be replaced with my boolean name (VisPPL) which im passing to it so I can pass different boolean arrays to the same procedure and it will set the values to that array.
Im not sure if I have explained my problem very well but any help is greatly appreciated.
Thanks, James
Code:
For i As Integer = 1 To Len(CStr(Number)) Step 1
Dim MidString As String
MidString = CStr(Number)
[B][U]GetValues("VisPPL", Mid(MidString, (Len(MidString) - i + 1), 1), i)[/U][/B]
Next i
Here is the code from the start of my procedure my procedure:
Code:
Public Sub GetValues(ByVal VarName As [B][U]????[/U][/B], ByVal Number As Integer, ByVal Row As Integer)
Select Case Number
Case 0
VarName(Row, 1) = True
VarName(Row, 2) = True
VarName(Row, 3) = True
VarName(Row, 4) = False
VarName(Row, 5) = True
VarName(Row, 6) = True
VarName(Row, 7) = True
Ive tried using a string where the ???? is as the datatype for the name of the boolean array and im simply trying to get the VarName to be replaced with my boolean name (VisPPL) which im passing to it so I can pass different boolean arrays to the same procedure and it will set the values to that array.
Im not sure if I have explained my problem very well but any help is greatly appreciated.
Thanks, James
Comment