PC Review


Reply
Thread Tools Rate Thread

Add value when recording a macro

 
 
=?Utf-8?B?TGl6Vw==?=
Guest
Posts: n/a
 
      16th Sep 2005
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
 
Reply With Quote
 
 
 
 
Debra Dalgleish
Guest
Posts: n/a
 
      16th Sep 2005
After you create the chart, turn on the macro recorder again
Select the chart, and choose Chart>Chart 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording a Macro-can I stop the Active window info from recording Pennyc Microsoft Excel Programming 2 23rd Jul 2009 10:56 PM
Macro with "relative" range for Average function, or... 'is there a real keystroke recording macro generator? jss Microsoft Excel Discussion 3 10th Jun 2009 01:46 AM
My excel macro recorder no longer shows up when recording macro =?Utf-8?B?amFjaw==?= Microsoft Excel Misc 1 5th Feb 2007 09:31 PM
My excel macro recorder no longer shows up when recording macro =?Utf-8?B?amFjaw==?= Microsoft Excel Misc 3 5th Feb 2007 08:22 PM
Recording a macro within existing macro. =?Utf-8?B?QkJRRGFk?= Microsoft Excel Programming 2 9th Feb 2005 10:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:42 AM.