Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In VBA I'd like to transfer a ListBox to a function.
For example: Private Sub CommandButton1_Click() Call GetIndex(ListBox1) End Sub Public Sub GetIndex(TempListBox As ListBox) MsgBox (TempListBox.ListIndex) End Sub Why do I get in VBA (e.g. Excel) at the statement Call GetIndex(ListBox1) the Run-time error '13' (Type mismatch)? In real VB it works. PS: If I use Public Sub GetIndex(TempListBox As Variant) it works. But I don't understand why. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Transfer ListBox items to a range | Excel Programming | |||
userform listbox cannot get listbox.value to transfer back to main sub | Excel Programming | |||
How do I transfer a keyboard function key to a terminal emulator? | Excel Worksheet Functions | |||
transfer data in listbox | Excel Programming | |||
Transfer multiple columns items form listbox to range | Excel Programming |