?
Solved

Array of user defined (Type)

Posted on 2000-04-19
4
Medium Priority
?
174 Views
Last Modified: 2010-05-02
I want to creat a project  that analyze an income survey.  The statistics for each home include ID number, number of members in the house hold, and yearly income.  As the data is  entered, they should be assigned to text boxes to the element of a user defined type.

The Report for the project will be sent to the printer and icludes the following:

It has three columns and 14 rows.

earth2d
0
Comment
Question by:earth2d
[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
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 300 total points
ID: 2731821
Public Type income
    ID(0 To 13) As Variant
    numbMembers(0 To 13) As Variant
    yrIncome(0 To 13) As Variant
End Type


Dim counter As Integer 'keep track of how many values have been entered
Dim newInc As income

Private Sub cmdEnter_Click()
    newInc.ID(counter) = txtID.Text
    newInc.numbMembers(counter) = txtMem.Text
    newInc.yrIncome(counter) = txtIncome.Text
    counter = counter + 1
End Sub

is that what you are asking?  I wasnt sure what your real question was.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 2731858
Sounds like homework!!!
0
 

Author Comment

by:earth2d
ID: 2732999
Option Explict
I think I am looking for something like this.
Dim intRow            As Integer
Dim intCol              As Integer

Private Type Survey
intIDNumber          As Interger
curAnnualSalary    As Currency
intPersons             As Integer
End Type

Then something like 3 combo boxes for input such
as this

cboSurvey(0)
cboSurvey(1)
cboSurvey(2)   'For Arrays

input data using
lstSurvey.AddItem    txtSurvey.Text
Etc Etc
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2733006
earth2d writes:
"I think I am looking for something like this."

Until you know what you want we wont be able to help you.  Even with your description above I dont know what it is you want.  All of a sudden there are comboboxes and a listbox. Please be more specific.
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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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

719 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