Add Item in list box inside chart sheet using vba
I have written macro for adding elements inside form control listbox using vba on chart sheet but after writting following code
elements are successfully added inside simple worksheet but not added inside chart sheet
Sub showChartDataList()
Set o = ActiveSheet.Shapes("List Box 2")
o.ControlFormat.RemoveAllItems
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
End Sub
Excel Sheet listBox (successfully Added)
chart sheet listbox (Elements not Added)
elements are successfully added inside simple worksheet but not added inside chart sheet
Sub showChartDataList()
Set o = ActiveSheet.Shapes("List Box 2")
o.ControlFormat.RemoveAllItems
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
o.ControlFormat.AddItem 1
o.ControlFormat.AddItem 2
o.ControlFormat.AddItem 4
o.ControlFormat.AddItem 5
End Sub
Excel Sheet listBox (successfully Added)
chart sheet listbox (Elements not Added)
Comments
Post a Comment