F
Freddie
hi all,
i have a problem to pass listbox object to a subroutine. i've
successfully pass combo box object so many times, but it displays
error messege 13 "Invalid Data Type messege"
here is the detail:
'*******************************************************************************
Private Sub fillAreaBreakdownLogic()
Select Case cboArea.List(cboArea.ListIndex)
Case constAreaAtmosphere
fillCboBreakdown cboBreakdown,
Worksheet(constSheetRefference).Range("B6:L6"), 0
'the debuger complains here (Type Mismatch),
'the datatypes of the arguments are listbox, range and
integer.
'which are i recon they're the same with the deffinition
'However lstBreakdown's value = Null
fillLstBreakdown lstBreakdown,
Worksheet(constSheetRefference).Range("B6:L6"), 0
End Select
End Sub
Sub fillCboBreakdown(ByRef cbo As ComboBox, ByRef aRange As Range,
Optional ByVal defaultIndex As Integer = -1)
'mind the code... this sub routines has done what i want (filling
combobox
'with items
End Sub
Sub fillLstBreakdown(lst As ListBox, ByRef aRange As Range, Optional
ByVal defaultIndex As Integer = -1)
msgbox "Me" 'when i debug the code, this error messege wasn't even
displayed
End Sub
'*******************************************************************************
freddie
i have a problem to pass listbox object to a subroutine. i've
successfully pass combo box object so many times, but it displays
error messege 13 "Invalid Data Type messege"
here is the detail:
'*******************************************************************************
Private Sub fillAreaBreakdownLogic()
Select Case cboArea.List(cboArea.ListIndex)
Case constAreaAtmosphere
fillCboBreakdown cboBreakdown,
Worksheet(constSheetRefference).Range("B6:L6"), 0
'the debuger complains here (Type Mismatch),
'the datatypes of the arguments are listbox, range and
integer.
'which are i recon they're the same with the deffinition
'However lstBreakdown's value = Null
fillLstBreakdown lstBreakdown,
Worksheet(constSheetRefference).Range("B6:L6"), 0
End Select
End Sub
Sub fillCboBreakdown(ByRef cbo As ComboBox, ByRef aRange As Range,
Optional ByVal defaultIndex As Integer = -1)
'mind the code... this sub routines has done what i want (filling
combobox
'with items
End Sub
Sub fillLstBreakdown(lst As ListBox, ByRef aRange As Range, Optional
ByVal defaultIndex As Integer = -1)
msgbox "Me" 'when i debug the code, this error messege wasn't even
displayed
End Sub
'*******************************************************************************
freddie