Arrays

D

David

I am going to just pasta my data example.

1/2/2004 Tom 285.00
12/19/2003 Tom 232.78
1/2/2004 Mark 220.56
12/19/2003 Mark 721.26
12/19/2003 Mark 854.82

I want to do an array where for Tom, (the dates and dollar
amounts fill into my userdefine variable that only contain
the dates and amount) and the same with Mark.

Can anyone Please Help
 
R

Rob van Gelder

David,

Type Transaction
TransDate As Date
Amount As Currency
End Type

Sub testit()
Dim arrTom(1) As Transaction, arrMark(2) As Transaction

arrTom(0).TransDate = "02-Jan-2004": arrTom(0).Amount = "285.00"
arrTom(1).TransDate = "19-Dec-2003": arrTom(1).Amount = "232.78"
arrMark(0).TransDate = "02-Jan-2004": arrMark(0).Amount = "220.56"
arrMark(1).TransDate = "19-Dec-2003": arrMark(1).Amount = "721.26"
arrMark(2).TransDate = "19-Dec-2003": arrMark(2).Amount = "854.82"
End Sub

Rob
 
A

Alan Beban

It isn't clear what you want the output to be. E.g., for Tom, where do
you want the two dates and amounts to end up?

Alan Beban
 
D

David Doston

Thanks Rob for answering.

I have another question. What if there are more fifty names with
similiar corresponding dates and amounts? In otherwords, I want the
names to be variables as well as the amounts and dates.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
R

Rob van Gelder

Those arrays are defined at design time. It's certainly possible to define
arrays at runtime.
To give you a good answer, could you tell me what you want to do with the
data once it's in an array?
 
D

David Doston

I will send the data to a Microsoft outlook email where each person on
the list will receive the data in the body of an email.

Thanks in advance for you help.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top