PDA

View Full Version : ListFillRange



makako
04-23-2007, 09:54 AM
ListFillRange
Hi, Ive tried to change the control ListFillRange of a combobox that shows me the plans. I tried these so far:




VBA:
Private Sub Workbook_Open() Dim lvRango As Range Set lvRango = Sheets("Controls").Range("A3") Range(lvRango, lvRango.End(xlDown)).Delete Set lvRango = Sheets("Plans").Columns("A:A").SpecialCells(xlCellTypeConstants) lvRango.Copy Sheets("Controls").Range("A3") 'Sheets("Planes").Controls("cbxCenterPlans").ListFillRange = Sheets("Controls").Range("A3").CurrentRegion.Address Set lb = Sheets("Planes").Controls("cbxCenterPlans") lb.ListFillRange = "Controls!" & Sheets("Controls").Range("A3").CurrentRegion.Address End Sub

VBA tags courtesy of www.thecodenet.com (http://www.thecodenet.com/)


After having all the elements in the correct range i try to change the property of the combo box but it keeps showing me errors. I tried



VBA:
Set lb = .Shapes("cbxCenterPlans") lb.ControlFormat.ListFillRange = "Controls!" & Sheets("Controls").Range("A3").CurrentRegion.Address

VBA tags courtesy of www.thecodenet.com (http://www.thecodenet.com/)


with the same results, thanks


Local Time: 11:51 AM
Local Date: 04-23-2007
Location: http://www.vbaexpress.com/forum/images/flags/Colombia%203D.gif