Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Add value when recording a macro
Hello,
I recorded a macro to create a bar chart - I checked the checkbox to add the values. Stopped recording and showed me the chart with the values. If I run the macro again, it does not display the value. What is the code I need to always display the value? -- LizW |
#2
|
|||
|
|||
After you create the chart, turn on the macro recorder again
Select the chart, and choose ChartChart Options On the Data Labels tab, check Values Click OK Turn off the macro recorder In the recorded code, you'll see a line similar to this: ActiveChart.ApplyDataLabels AutoText:=True, LegendKey:=False, _ HasLeaderLines:=False, ShowSeriesName:=False, _ ShowCategoryName:=False, _ ShowValue:=True, ShowPercentage:=False, ShowBubbleSize:=False Copy that line and paste it in your original macro code, after the lines of code that create the chart. LizW wrote: Hello, I recorded a macro to create a bar chart - I checked the checkbox to add the values. Stopped recording and showed me the chart with the values. If I run the macro again, it does not display the value. What is the code I need to always display the value? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I turn the Macro Stop Recording Toolbar on and off? | Excel Discussion (Misc queries) | |||
Recording new excel macro, relative reference button doesn't show | New Users to Excel | |||
Recording simple macro | Excel Worksheet Functions | |||
Macro doesn't work but recording it does. | Excel Discussion (Misc queries) | |||
Recording a macro ... | Excel Discussion (Misc queries) |