Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I need help with this code. i need to be able to remove the combobox list before i add a new one. Private Sub ValidateUnit() If Application.WorksheetFunction.Clean(Trim(cboStatio n)) = "" Then Label143.Visible = False Label144.Visible = False cboUnit.Visible = False Else Label143.Visible = True Label144.Visible = True cboUnit.Visible = True 'specify unit list Select Case Application.WorksheetFunction.Clean(Trim(cboStatio n)) Case "00R0" With cboUnit .AddItem "Warehousing" .AddItem "Valuation" End With Case "00P0" With cboUnit .AddItem "Office" .AddItem "Shed" End With Case "00CA" With cboUnit .AddItem "Office" End With Case "00MH" With cboUnit .AddItem "Office" End With Case "00AN" With cboUnit .AddItem "Office" End With Case Else 'Do Nothing End Select End If End Sub I tried adding the code below but i get this an error message "Compile error: Argument not optional" If cboUnit.Visible = True Then With cboUnit .RemoveItem.ListIndex End With End If Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combo box VBA error | Excel Discussion (Misc queries) | |||
Combo box error | Excel Programming | |||
Combo List Circ Error? | Excel Programming | |||
Filtered list for Combo Box ListFillRange - Nested Combo Boxes | Excel Programming | |||
Combo Box List out of range error. | Excel Discussion (Misc queries) |