Embedded Chart on Worksheet Using Excel Vba
Sponsor
Embedded Chart on Worksheet Using Excel Vba [Q]
Hi, i have an excel button command that brings a embedded chart onto my excel worksheet, it works fine, so i wanted to write a simple excel macro to assign to another macro button to delete the chart when i had finished looking at it, this is what microsoft Excel recorded:
ActiveSheet.ChartObjects(”Chart 5029″).Activate
ActiveChart.Axes(xlValue).Select
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Selection.Delete
Now this works as long as the “Chart 5029″ number is the same as on the
chart its self ,ie when i left click and put it in an excel chart window to see what the number is along the top of the box, so, i press the button, it works, i
call up a chart again with the other button, press the delete button and
error, because the Chart number as changed to one thats different to the one
in the excel macro. I don’t know what the number is for and how to either stop it from changing ( why does it change ) or to write an excel macro to adjust for the change in this number.
Embedded Chart on Worksheet Using Excel Vba [A]
This excel vba can embed one chart on your excel worksheet, so if you have only one chart on your worksheet use
ActiveSheet.ChartObjects(1).Activate
Rate This Tips:
Incoming excel search terms
mss,excel vba delete chart,excel vba delete all charts,excel vba embedded chart,vba chart,vba embedded chart,excel embedded chart,vba add chart to worksheet,vba charts,vba delete chart,vba delete charts,vba embed,,embedded chart,excel macro delete chart,activechart parent delete,embedded chart vba,excel vba activate embedded chart,excel vba activechart,excel vba chart,excel vba embedded charts,excel vba select embedded chart,how do you delete an embedded chart,rename chart vba,vba activate chart,vba activechart,vba chart window,vba excel delete chart,=embed excel vba,activating embedded charts on a sheet by name ms excel,activechart excel vba,activechart select using excel vba,an embedded chart is one that is,chart vba,charts in one worksheet vba,clear chart based on criteria,clear chart based on criteria using vba,copy embedded chart to excel,delete a chart in excel when another assign macro button is clicked,delete chart by name excel vba,delete chart excel vba,delete chart vba,delete charts vba,delete embedded chart vba,embed chart excel vba,embed excel vb,embedded chart excel,embedded chart in vba,embedded charts excel vba,embedded visual basic excel
Related Excel Tips
Comments
Have another excel answer or questions for this problem ?
Feel free to post it here..















