Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Type mismatch passing arrays via COM | Excel Programming | |||
Passing Arrays to SUBs | Excel Programming | |||
Passing arrays to VBA module | Excel Programming | |||
passing arrays between functions in VBA | Excel Programming | |||
Passing arrays to a subroutine | Excel Programming |