B
Brian
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.
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.