Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
How to add additional columns? Dave452 Excel Discussion (Misc queries) 4 September 3rd 09 05:07 AM
Need additional help Pamela Jean Excel Worksheet Functions 6 October 19th 06 07:12 PM
additional row of tabs Lori Excel Discussion (Misc queries) 2 July 24th 06 05:49 PM
Additional column gavmer[_7_] Excel Programming 0 May 17th 04 03:28 AM
Add additional value to a cell Rasmus[_2_] Excel Programming 2 September 7th 03 11:28 PM


All times are GMT +1. The time now is 05:25 PM.

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

About Us

"It's about Microsoft Excel"