Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bit of a problem - HELP

5 views
Skip to first unread message

Michael Warner

unread,
Mar 28, 2005, 7:01:11 PM3/28/05
to
hey guys,

I am having a bit of an issue with a project I'm doing. Basically what
it will ultimately end up able to do is that it will accept set up a
dynamic array based on user input and allow the user to define the value
for each dimension in the array. It will output the High value, the Low
value and the average of them all. I seem to have a bit of a problem.
I can't seem to get a working function for finding the lowest value of
the array. If anyone could help me, I would be most greatful.

Source code has been included as an attachment

frmCards.frm

Steve Gerrard

unread,
Mar 28, 2005, 9:00:40 PM3/28/05
to

"Michael Warner" <cornersto...@adelphia.net> wrote in message
news:h9OdnU4ggN5...@adelphia.com...

>
> I can't seem to get a working function for finding the lowest value of
> the array. If anyone could help me, I would be most greatful.
>
> Private Function HiCard()
> Dim intHiCard As Integer
> Dim intIndex As Integer
>
> For intIndex = LBound(ArrScore) To UBound(ArrScore)
> If ArrScore(intIndex) > intHiCard Then
> intHiCard = ArrScore(intIndex)
> End If
> Next intIndex
>
> HiCard = intHiCard
>
> End Function
>

I will start you off, and hope you recognize a pattern:

Private Function LoCard()
Dim intLoCard As Integer
Dim intIndex As Integer

intLoCard = HiCard() 'starting value

For intIndex = LBound(ArrScore) To UBound(ArrScore)
' and you know the rest....


Michael Warner

unread,
Mar 28, 2005, 11:01:38 PM3/28/05
to
the low card now returns a value of 0

Steve Gerrard

unread,
Mar 29, 2005, 12:00:53 AM3/29/05
to

"Michael Warner" <cornersto...@adelphia.net> wrote in message
news:yf6dnT_-ppi...@adelphia.com...

> Steve Gerrard wrote:
>> "Michael Warner" <cornersto...@adelphia.net> wrote in message
>> news:h9OdnU4ggN5...@adelphia.com...
>>
>>
> the low card now returns a value of 0

Um, it would help if you posted your code...


0 new messages