austin350s10
Active Member
- Joined
- Jul 30, 2010
- Messages
- 321
I know I am doing this wrong but I what I am trying to do is pass an array from boxSelect_Change to subBox_Change. Then I want to reference that array inside subBox_Change. Is there even a way to do this?
Here is my attempt:
Here is my attempt:
Code:
Private Sub boxSelect_Change()
If boxSelect.Value <> "" Then
lblSub.Visible = True
boxSub.Visible = True
Select Case boxSelect.Value
Case "Yes"
boxSub.List = Array("yes1", "yes2")
pNum = Array("101", "102")
Case "No"
boxSub.List = Array("no1", "no2")
pNum = Array("201", "202")
End Select
boxSub_Change Arr:=pNum
Else
lblSub.Visible = False
boxSub.Visible = False
End If
End Sub
Private Sub boxSub_Change(ByRef Arr() As Long)
If boxSub.Value <> "" Then
btnCreate.Visible = True
End If
MsgBox Arr(boxSub.ListIndex)
End Sub