Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default Passing Type Arrays

Firstly the important bits of code

Type aLocation
location as String
qty as Long
End Type

....

Private Sub CreateSheets()
Dim loc() as aLocation
....
loc = e.getBinLocations
....
End Sub

'Held in CSKU Class (e from above is a CSKU Object
Public Function GetBinLocations() As aLocation
GetBinLocations = binLocations
End Function

When running i get the error message, "Type Mismatch", on the line loc =
e.getBinLocations. Basically just want to grab an array of aLocation type and
assign it to loc which is an array of aLocation type.

No Idea why it won't work, is there anything I should be aware of when
passing an array of type?

Cheers for any help thrown my way.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default Passing Type Arrays

Just an edit

'Held in CSKU Class (e from above is a CSKU Object
Public Function GetBinLocations() As aLocation()
GetBinLocations = binLocations
End Function

Forgot to write in the Brackets on this at the end of "As aLocation"
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Passing Type Arrays

It works fine for me, with a few guesses as to what you might have and what
you are doing.

It wouldn't of course if you were trying to pass a Type as an argument
between different projects.

Regards,
Peter T


"NateBuckley" wrote in message
...
Firstly the important bits of code

Type aLocation
location as String
qty as Long
End Type

...

Private Sub CreateSheets()
Dim loc() as aLocation
...
loc = e.getBinLocations
...
End Sub

'Held in CSKU Class (e from above is a CSKU Object
Public Function GetBinLocations() As aLocation
GetBinLocations = binLocations
End Function

When running i get the error message, "Type Mismatch", on the line loc =
e.getBinLocations. Basically just want to grab an array of aLocation type
and
assign it to loc which is an array of aLocation type.

No Idea why it won't work, is there anything I should be aware of when
passing an array of type?

Cheers for any help thrown my way.



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
Type mismatch passing arrays via COM Dan Neely[_2_] Excel Programming 0 January 24th 08 04:38 PM
Passing Arrays to SUBs Bill Martin[_3_] Excel Programming 4 October 27th 06 02:37 PM
Passing arrays to VBA module Ralph K Excel Programming 1 November 20th 04 03:57 PM
passing arrays between functions in VBA Tom Ogilvy Excel Programming 3 March 1st 04 06:54 PM
Passing arrays to a subroutine Braden Craig Excel Programming 4 August 17th 03 05:54 PM


All times are GMT +1. The time now is 11:30 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"