Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I am trying to create a function that will take a combo box as an argument and additem the names of the months to it. the reason for the function is that i will be using several combo boxes throughout my form with the same data so far my code is as follows: <BEGIN VB CODE Private Function CreateMonthListBox(MonthListBox&) As ComboBox CreateMonthListBox.AddItem ("March") CreateMonthListBox.AddItem ("April") CreateMonthListBox.AddItem ("May") CreateMonthListBox.AddItem ("June") CreateMonthListBox.AddItem ("July") CreateMonthListBox.AddItem ("August") CreateMonthListBox.AddItem ("September") CreateMonthListBox.AddItem ("October") CreateMonthListBox.AddItem ("November") CreateMonthListBox.AddItem ("December") CreateMonthListBox.AddItem ("January") CreateMonthListBox.AddItem ("February") Set MonthListBox = CreateMonthListBox End Function <END VB CODE the line that calls this function is: CreateMonthListBox (depositMonthList) depositMonthList is a ComboBox on my form when i run my code i get the error: Run-time error'13' Type mismatch ??? - what am i doing wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use match function to add different item in Combobox | Excel Worksheet Functions | |||
ComboBox with an editable function | Excel Programming | |||
if it is possible to add a combobox to a self-made function | Excel Programming | |||
if it is possible to add a combobox to a self-made function . | Excel Programming | |||
Date function and combobox | Excel Programming |