LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Help: Compile error: type mismatch: array or user defined type expected

Hi there,

I defined a type named testArray and student() as an array of testArray
type. The compiler always reports "array or user defined type expected"
compile error no matter how I give the array parameter to the function.

Public Type testArray
age() As Integer
End Type


Sub calling()
Dim student() As testArray
called (student)
End Sub

Sub called(ByRef temparray() As testArray)
temparray(1).age(1) = 20
End Sub

What's wrong with called(student)?

I also tried called(student()). It doesn't work either.

 
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
#13 type mismatch error on user form for Dave Peterson Janis Excel Discussion (Misc queries) 5 January 17th 08 07:35 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
Compile error: type mismatch pjhageman Excel Programming 2 January 10th 04 08:48 PM
setting ctl to array of checkboxes yields type mismatch error. tritan Excel Programming 0 July 11th 03 09:22 PM
setting ctl to array of checkboxes yields type mismatch error. Tritan Excel Programming 0 July 11th 03 07:50 PM


All times are GMT +1. The time now is 02:44 PM.

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

About Us

"It's about Microsoft Excel"