W
Wellie
I created a user form with a list box. I use the
following codes to fill the list
sub main()
Dim Mon_List As ListBox
' LstB_Months is the name of the Listbox on the form
' *** Get a "Run-time error 13. Type Mismatch" in the
' Set Mon_List statement below. - Why ???
Set Mon_List = UF_Generate_Report.LstB_Months
Call Fill_Mon_List(UF_Generate_Report.LstB_Months)
end sub
' A simple test routine
sub Fill_Mon_List(MonList as ListBox)
MonList.AddItem "Jan"
MonList.AddItem "Mar"
MonList.AddItem "May"
end sub
I'm getting "Run-time error 13. Type mismatch" error when
I try to run this code.
Can someone please tell me what I did wrong here ?
Thanks in advance
following codes to fill the list
sub main()
Dim Mon_List As ListBox
' LstB_Months is the name of the Listbox on the form
' *** Get a "Run-time error 13. Type Mismatch" in the
' Set Mon_List statement below. - Why ???
Set Mon_List = UF_Generate_Report.LstB_Months
Call Fill_Mon_List(UF_Generate_Report.LstB_Months)
end sub
' A simple test routine
sub Fill_Mon_List(MonList as ListBox)
MonList.AddItem "Jan"
MonList.AddItem "Mar"
MonList.AddItem "May"
end sub
I'm getting "Run-time error 13. Type mismatch" error when
I try to run this code.
Can someone please tell me what I did wrong here ?
Thanks in advance