LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default combo box list error

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box VBA error R Ormerod Excel Discussion (Misc queries) 5 October 5th 07 03:34 PM
Combo box error Greg[_27_] Excel Programming 3 May 13th 06 02:09 PM
Combo List Circ Error? ToferKing Excel Programming 0 April 20th 06 01:49 AM
Filtered list for Combo Box ListFillRange - Nested Combo Boxes DoctorG Excel Programming 3 February 23rd 06 12:15 PM
Combo Box List out of range error. Kiran Excel Discussion (Misc queries) 3 July 6th 05 01:27 PM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"