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
Solved

Array of user defined (Type)

Posted on 2000-04-19
4
170 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
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
message box in access 4 51
vb6 connector to mongodb 2 115
Help me. 3 60
Collapse and expand table in Word 2010 2 27
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

792 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