Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Array of UDT

- As readers()

is that a typo, or should it be - As reader()

Regards,
Peter T

"justahelper" wrote in message
...
I have defined the following:
Type reader
r_sname As String
r_name As String
r_restel As String
r_offtel As String
r_mobile As String
End Type

and am trying to use it in the following function:

Function GetReaderRecordsArray(rngTimeCell As Range) As readers()
Dim rngCommRng As Range
Dim u_readers() As reader
Dim bCommArr() As Boolean
Dim i As Integer
Dim j As Integer
Dim c_comm As Integer

Set rngCommRng = GetCommitRng(rngTimeCell)
bCommArr = GetCommFromCommitRng(rngCommRng)
c_comm = GetYesCountFromCommRng(bCommArr)

If c_comm 0 Then
ReDim u_readers(c_comm)

i = 0

For j = LBound(bCommArr) To UBound(bCommArr)
If bCommArr(j) Then
i = i + 1
u_readers(i) = GetReaderRecord(rngCommRng.Cells(j, 1))
Else
End If
Next j
End If
GetReaderRecordsArray = u_readers

End Function

I get a compile error msg. Can anyone help me fix this?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex conditional summing - array COUNT works, array SUM gives#VALUE fatcatfan Excel Worksheet Functions 4 November 18th 09 06:41 PM
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 6 November 9th 05 05:54 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"