View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Hokievandal Hokievandal is offline
external usenet poster
 
Posts: 13
Default pass combobox as argment to procedure

I'm hungup trying to pass a combo box to a procedure with the 'Type Mismatch'
error. Here's a sample of what I'm trying to do. I think I'm passing the
string title of the cbox instead of the object.

Private Sub UserForm_Initialize()
Debug.Print "txtBox1 Name = " & Me.txtBox1.Name
Call PassTxtBox(txtBox1)
End Sub

Private Sub PassTxtBox(ByRef itxtBox As TextBox)
Debug.Print "Passed Text Box Name = " & itxtBox.Name
End Sub