[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Save a small integer array as part of a udt

Posted on 2014-01-18
5
Medium Priority
?
159 Views
Last Modified: 2014-01-19
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
Comment
Question by:isnoend2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
Ark earned 2000 total points
ID: 39791805
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

Open in new window


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

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

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

Open in new window

0
 

Author Closing Comment

by:isnoend2001
ID: 39791833
Thanks
no problem now
0
 

Author Comment

by:isnoend2001
ID: 39791844
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
 
LVL 28

Expert Comment

by:Ark
ID: 39791846
.tmpWonLost = CCur(gridCardStats.TextMatrix(6, 1))
For i=1 To 10
 .mMarkedNumber(i) = mMarkedNumber(i)
Next i
0
 

Author Comment

by:isnoend2001
ID: 39792057
thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question