Link to home
Start Free TrialLog in
Avatar of sathish kumar
sathish kumar

asked on

Macro Working on Activex combo box to Form control Combo box

Previous I raise this question to select and display the multiple chart in one sheet and mr.mlmcc he gave me the solution its worked fine but the selection combo box is Activex control. i opened the file in my company pc activex control not working so i tried to change with Form control combo box and i add the code its getting the object error. please kindly modify the code to form control combo box to display the chart.
Private Sub ComboBox1_Change()

If ComboBox1.Text = "alpha chart" Then
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveSheet.Shapes("Chart 1").ZOrder msoBringToFront
ElseIf ComboBox1.Text = "Bravo chart" Then
    ActiveSheet.ChartObjects("Chart 2").Activate
    ActiveSheet.Shapes("Chart 2").ZOrder msoBringToFront
Else
    ActiveSheet.ChartObjects("Chart 3").Activate
    ActiveSheet.Shapes("Chart 3").ZOrder msoBringToFront
End If

End Sub

Open in new window

View-chart-by-selecting.xlsm
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

Note I've changed the new ComboBox's name to cboChart
ASKER CERTIFIED SOLUTION
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sathish kumar
sathish kumar

ASKER

Hi Roy_cox,

Thank you very much its working perfect and code is simple and super. Many thanks
Thanks for the quick response and excellent work
Pleased to help
Hi Roy_cox,

Whenever i posting the new question how can i tag you? or i should the send the message  to ask help?