Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All,
I'm getting a compile error: Type mismatch: array or user-defined type expected on the "Call Sort(arrDate)" line. What should I be looking for to troubleshoot this? Below are the lines of code that deal with arrDate. Sub Button17_Click() ReDim arrDate(0) Call GetMonths(arrDate,arrSite) Call SiteSelected(arrDate,arrSite) End Sub Sub GetMonths(arrDate, arrSite as Variant) 'Here is where I build arrDate and send to Sort to get them in order Call Sort(arrDate) End Sub Sub Sort(arr() as Variant) 'Sort array in order End Sub Sub SiteSelected(arrDate,arrSite as Variant) 'Here arrDate is actually used End Sub I know my arrDate array gets built properly because it appears correctly in the SiteSelected Procedure when I skip the Sort Procedure. Clearly I don't know how to pass arrays through procedures effectively so any help with that would be appreciated also. -- Brian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing Arrays to a Sub | Excel Programming | |||
Passing Variables Between Procedures | Excel Programming | |||
Calling Procedures from another excel sheet by passing objects | Excel Programming | |||
passing arrays between functions in VBA | Excel Programming | |||
Passing ARGUMENTS between event procedures of a USERFORM | Excel Programming |