• Status: Solved
• Priority: Medium
• Security: Public
• Views: 165

# Save a small integer array as part of a udt

How to include this array into the udt below
mMarkedNumber(1 To 10)  As Integer
can this be done if yes how ?

Public Type SavedKenoGameGame
tmpbetMode As Integer
tmpSpotMarked As String * 2
tmpLabelCredit As Currency
tmpRuns As Long
tmpLost As Currency
tmpWon As Currency
tmpWonLostPerRun As Currency
tmpBiggestWin As Currency
tmpTotalBet As Currency

End Type

can this be done if yes how ?
0
isnoend2001
• 3
• 2
1 Solution

Commented:
What is the problem?
'===Module===
``````Public Type SavedKenoGameGame
tmpbetMode As Integer
tmpSpotMarked As String * 2
tmpLabelCredit As Currency
tmpRuns As Long
tmpLost As Currency
tmpWon As Currency
tmpWonLostPerRun As Currency
tmpBiggestWin As Currency
tmpTotalBet As Currency
mMarkedNumber(1 To 10) As Integer
End Type
``````

'===Form===
``````Dim z As SavedKenoGameGame

For i = 1 To 10
z.mMarkedNumber(i) = i * 100
Next i
End Sub

Private Sub Command1_Click()
MsgBox z.mMarkedNumber(3)
End Sub
``````
0

Author Commented:
Thanks
no problem now
0

Author Commented:
how do i save the array ?
this does not work:
Dim CleoGame As SavedKenoGame
With CleoGame
.tmpbetMode = mBetMode
.tmpSpotMarked = Val(lblMarked)
.tmpLabelCredit = lblCredit.Caption
.tmpRuns = Val(gridCardStats.TextMatrix(2, 1))
.tmpLost = CCur(gridCardStats.TextMatrix(5, 1))
.tmpWon = CCur(gridCardStats.TextMatrix(4, 1))
.tmpWonLostPerRun = CCur(gridCardStats.TextMatrix(7, 1))
.tmpBiggestWin = CCur(gridCardStats.TextMatrix(3, 1))
.tmpTotalBet = CCur(lblBet)
.tmpWonLost = CCur(gridCardStats.TextMatrix(6, 1))
.mMarkedNumber = mMarkedNumber
End With
0

Commented:
.tmpWonLost = CCur(gridCardStats.TextMatrix(6, 1))
For i=1 To 10
.mMarkedNumber(i) = mMarkedNumber(i)
Next i
0

Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

## Featured Post

• 3
• 2
Tackle projects and never again get stuck behind a technical roadblock.