Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
additional help
The two lines below are producing errors? I deleted the
first line and re-ran and the second line gave error? With Worksheets("CCFCOK") Set rng = .Range(.Cells(1, 1), .Cells(Rows.Count, 1).End(xlUp)) Set rng = rng(CCFCLC.cmbcc.ListIndex + 1) End With * CCFCLC.cmbfc.Clear Set cell = rng.Offset(0, 1) Do While Not IsEmpty(cell) If LCase(cell.Value) = "yes" Then * CCFCLC.cmbfc.AddItem cell.Parent.Cells(1, cell.Column).Value End If Set cell = cell.Offset(0, 2) Loop |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
additional help
Dim cbox1 as msforms.combobox
dim cbox2 as msforms.combobox With Worksheets("CCFCOK") set cbox1 = .OleObjects("cmbcc").Object set cbox2 = .OleObjects("cmbfc").Object Set rng = .Range(.Cells(1, 1), .Cells(Rows.Count, _ 1).End(xlUp)) Set rng = rng(cbox1.ListIndex + 1) End With cbox2.clear Set cell = rng.Offset(0, 1) Do While Not IsEmpty(cell) If LCase(cell.Value) = "yes" Then cbox2.AddItem cell.Parent.Cells(1, _ cell.Column).Value End If Set cell = cell.Offset(0, 2) Loop Make sure the combobox has an OleObject name of cmbfc for the 2ndbox and cmbcc for the first box. go into design mode and click on the combobox. Look in the name box. Assumes both boxes are on sheet CCFCOK -- Regards, Tom Ogilvy "scrabtree23" wrote in message ... The two lines below are producing errors? I deleted the first line and re-ran and the second line gave error? With Worksheets("CCFCOK") Set rng = .Range(.Cells(1, 1), .Cells(Rows.Count, 1).End(xlUp)) Set rng = rng(CCFCLC.cmbcc.ListIndex + 1) End With * CCFCLC.cmbfc.Clear Set cell = rng.Offset(0, 1) Do While Not IsEmpty(cell) If LCase(cell.Value) = "yes" Then * CCFCLC.cmbfc.AddItem cell.Parent.Cells(1, cell.Column).Value End If Set cell = cell.Offset(0, 2) Loop |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to add additional columns? | Excel Discussion (Misc queries) | |||
Need additional help | Excel Worksheet Functions | |||
additional row of tabs | Excel Discussion (Misc queries) | |||
Additional column | Excel Programming | |||
Add additional value to a cell | Excel Programming |