View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RADO[_3_] RADO[_3_] is offline
external usenet poster
 
Posts: 79
Default How to pass ListBox into a Sub?

Hi all,

I am trying to pass a Listbox into a sub, and declared something like this:

Sub Handle_ListBox (MyListBox as ListBox)
MyListBox.Enabled=False
....
End sub

When I try to pass a listbox to the sub:

Handle_Listbox formHello.listboxVendors

I get a "type mismatch" error. The same approach works perfectly for combo
box.

What's the difference? Where am I wrong?

Thanks -
RADO