nuc_n_futs
Board Regular
- Joined
- Dec 10, 2008
- Messages
- 78
Hi,
I am trying to populate combobox2(cmbcity) with the visible rows of an autofilter from combobox1(cmbstate)
For the life of me, I cannot figure out why I have an error:
Private Sub cmbstate_Change()
Dim sState As String
Dim rcity As Range
sState = cmbstate.Value
Application.ScreenUpdating = False
Set rcity = Sheet3.Range("b3:b800")
Sheet3.Activate
Sheet3.Range("$a$2:$g$685").AutoFilter field:=1, _
Criteria1:=sState
Sheet1.Select
cmbcity.ListFillRange = "city"
With cmbcity
ListFillRange.SpecialCells (xlCellTypeVisible)
End With
Application.ScreenUpdating = True
End Sub
I am getting a run time error 424, Object Required on line:
ListFillRange.Specialcells (xlcelltypevisible)
Can someone tell me what i am doing wrong?
Thanks,
Nuc
I am trying to populate combobox2(cmbcity) with the visible rows of an autofilter from combobox1(cmbstate)
For the life of me, I cannot figure out why I have an error:
Private Sub cmbstate_Change()
Dim sState As String
Dim rcity As Range
sState = cmbstate.Value
Application.ScreenUpdating = False
Set rcity = Sheet3.Range("b3:b800")
Sheet3.Activate
Sheet3.Range("$a$2:$g$685").AutoFilter field:=1, _
Criteria1:=sState
Sheet1.Select
cmbcity.ListFillRange = "city"
With cmbcity
ListFillRange.SpecialCells (xlCellTypeVisible)
End With
Application.ScreenUpdating = True
End Sub
I am getting a run time error 424, Object Required on line:
ListFillRange.Specialcells (xlcelltypevisible)
Can someone tell me what i am doing wrong?
Thanks,
Nuc