the problem is, you are passing in a SINGLE picturebox.. not the array
but i cant remember how to make the sub accept it.. unless its a variant
VB Code:
Sub MySub(pbx1 As Variant) For x = 0 To pbx1.ubound Debug.Print pbx1(x).Index Next End Sub Private Sub Command1_Click() MySub Picture1 End Sub




Reply With Quote