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
0
LizW (2)
9/16/2005 5:10:06 PM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
253 Views

Similar Articles

[PageSpeed] 8

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

0
dsd1 (5911)
9/16/2005 8:40:52 PM
Reply:

Similar Artilces:

Switchboard hangs when running a macro
Access 2003: I've recently discovered the Switchboard - a grand concept; wish it wasn't so hidden... When running a macro from a form, no problem. But when running the same macro from the Switchboard, Access hangs. It seems to run all of the steps in the macro, and finish, but then Access hangs. Any help would be appreciated. Thanks, Mike in Sugar Land, TX On Mon, 30 Nov 2009 21:28:03 -0800, Switchboard newbie <Switchboard newbie@discussions.microsoft.com> wrote: My crystal ball is broken. Can you post some code, stripped to the bare essentials? -Tom. ...

Build value from cell content & sheet name !
Hi All, Interesting query (I hope).... I'd like to create a value in a cell that represents a concatenation of a value in another cell and the sheet name (tab name). Example, sheet name is 'A' and value in cell 'M15' is '1162'. I'd like cell 'M18' to indicate a value of '1162A'. Any ideas ?? Thanks, Neil =M15&sheet_name to get sheet_name see http://www.xldynamic.com/source/xld.xlFAQ0002.html -- HTH RP (remove nothere from the email address if mailing direct) "Neil" <me@home.com> wrote in message news:dekai3$1p...

How do I add a secondary axis to a pivot table chart?
Using XL2007 - the secondary axis radio buttons are greyed out. Is there a way to add the 2nd axis? Hi, This is chart type dependent. Suppose you have a line chart, right click the series and choose Format Series, the Axis radio button should be available. What type of chart are you using? Cheers, Shane Devenshire "dangelor" <dangelor@discussions.microsoft.com> wrote in message news:2610028F-5FAF-4400-A3E3-B7D0CCEFB443@microsoft.com... > Using XL2007 - the secondary axis radio buttons are greyed out. Is there a > way to add the 2nd axis? ...

Trigger Macro on Open Spreadsheet
How can we force a macro to execute whenever a spreadsheet is first opened? Hi do you mean the file? If yes either name your macro Auto_Open() or put your code in the workbook event Workbook_Open() -- Regards Frank Kabel Frankfurt, Germany Beckie Davis wrote: > How can we force a macro to execute whenever a spreadsheet > is first opened? ...

Copying values/formulas from only visable lines when filters are o
I have huge spreadsheet with dozens of columns, and filters are on most columns. In my last column, I want to systematically post the results only of specific lines while specific (and sometimes multiple) filters are on. Also, the last column is filtered for "blanks" only, so if a line already has a value from copying a prior filter value that value does not get overwritten by a more recent filtered value. I have done this for years in excel 2003, but in 2007 the values from the non-visible lines copy over to my last column as well, which I don't want. How c...

Toggle switch between absolute and relative values creating a macr
Hello, Why is it that when creating a macro sometimes I see the toggle switch for absolute/relative values and sometimes I don't? Actually, I no longer see the toggle switch when recording a new macro. What do I have to do to make it reappear? Thank you. "Al" wrote: > Hello, > Why is it that when creating a macro sometimes I see the toggle switch for > absolute/relative values and sometimes I don't? Al Tools>Customize>Toolbars. Select "Stop Recording" toolbar>Close Stop Recording Toolbar should now be visible on sheet. Hit "X"...

How to compare "varchar" values?
I need to compare a student's score (that s/he got it after a test) with the score requirement. The problem is the scores are either a "character" only, i.e., "2" OR combined a "character" AND the '+'/ '-' character, i.e., 2+. For example, if the require score is 2+ and the student's score is 2 then that student is not qualified. The datatype of scores is varchar. Can you please help in programming how to compare these values? Thanks a lot in advance. I appreciate it. I see two approaches. The first one is a trick, ...

Use cell value as cell address
Hello everyone. I have a worksheet "Main" of 39,000 rows in which column B contains a number between 1 and 7,500. Column C is an empty column I have added. The second sheet, "Names" in the book contains a single column - A - of 7,500 names. I want to get the value from the second sheet that matches the number column of the first sheet. In other words, if "Main" cell B3 contains 3780, I want to put the value from "Names" cell A3780 into "Main" C3. How do I do this please? Richard --- Message posted from http://www.ExcelForum.com/ Hi tr...

Migrating notes records
Using Data Migration Manager I have uploaded 68000+ notes to CRM 4. However all notes show a creation date of 5/10/2008. Even more strangely, I have found that the AnnotationBase table contains the correct dates from the import file in the CreatedOn field, but has not set the OverriddenCreatedOn field. The server was built a few months ago, but certainly not in October 2008 - anyone have ideas as to how I can persuade CRM to recognise the values in CreatedOn? ...

pre-select new record in combo box
Hi, I have a form (frmActivity) with a combo box (cboStore) that gets its data from a table (Store). If there is a new store which dose not show in the combo box I have a command button on the same form that open a popup window for entering the name of the new store. In the 'on close' event of the popup I requeary the combo box (cboStore) on the main form so that the new store will appear. What I would really like is to have the new store already selected in the combo box when the popup is closed. Is this possible and if so how? Thanks, Phil Try after the requery of the ...

Select null values in Crystal Report
I want to select those records in a Crystal Report where the country is not filled. I can select those where it is filled, however I get zero record back when I want to select where it is not filled. I use the following selection formula in the record selection part: Length ({account.address1_country}) < 1 Any idea is appreciated. Thanks, Miklos ...

how do I add in a dinamic graph the total as a new series?
I want to add, in a dinamic graphic, a new series: the mean. Is it possible? I need it to compare each series with the mean. Thanks in advance. Regards, Guillermo Fuenzalida The graph won't calculate the mean for you, so you'll need to calculate the mean as a new series in your data sheet, and then include that series as a new series in your graph. -- David Biddulph "Guillermo Fuenzalida" <Guillermo Fuenzalida@discussions.microsoft.com> wrote in message news:117FBACB-4DD2-41CC-864B-632666BE5CD5@microsoft.com... >I want to add, in a dinamic graphic, a new ser...

Solver Add-in #2
I have an Excel File (around 4.5 megs) with 28 sheets. using the Solver add-in on the NPV function subject to a few restricting criteria. Max iterations 100 Max Change 0.01 under the Tools --> Calculation menu. Now when I launch Excel for the first time, I can click Tools --> Solver and see the conditions et al. but exiting from the Solver once and then later on trying to reaccess it through the same Tools --> Solver the Solver dialog does not come up. I have to quit excel and restart it again to view the Solver dialog. What could be going wrong here? Any ideas/suggestions? No ...

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 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, _ Ha...

Attachments to window notes vs record notes
Got an odd situation. On record notes we have the paperclip and can attach files with no problems. On window notes there is no paperclip. Never tried to attach a document to a window note before but always assumed that both record level and window level notes would act the same way. Has anyone else seen this? Should we be able to attach documents to window level notes? GP10, SP3. Thx. No - the behaviour you are seeing is by design. Window notes have never allowed for OLE attachments. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC h...

Macro or VBA
I am dumb, but would like to automatically trim down reports that we get from our IT dept. We have to delete redundant columns (A,B,C,D,E,G,H,J,K)from each report. In other words, the only data we want to view is in F,I,J,P. Can this done more effciently with a macro or VBA/ Could someone give me an example of either so that I could work from and learn? Thank-You start a new workbook open one of those report workbooks record a macro into that new workbook (not the report workbook) when you delete the columns you don't want. stop recording back to that new workbook save it as a nice...

how to program recurring value
I wish every entry of a colums to be a the same function of the entry above. How do I do that? Leo Hi Leo! Assuming that you have your first formula entered Select the range covered by the common entry formula F2 Ctrl + Enter -- -- Regards Norman Harker MVP (Excel) Sydney, Australia Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "Leo Kerner" <l.kerner@sympatico.ca> wrote in message news:404294EF....

VS2003
Hello, I have a dialog resource and have created CDialog and a CFormView classes for this dialog. If I right-click a control in my dialog I can create a variable for the control, but how do I specify which class the variable belongs to, ie. my CDialog or CFormView class? I don't see how I can tell the add variable class wizard to which class the variable should be added. I'm converting a Dialog based app to a doc-view type app and am experimenting with CFormView, which is why I have CFormView and CDialog classes referencing the same dialog resource. Thanks for any help. -R...

passing non-field value into vba
I need to pass the line item sequence number (lnitmseq) from the sales item detail entry window into vba. This isnt a visible field in the window, so i cannot "add field to vba" using the TOOLS --> customize toolbar window. Anyone have any idea how this can be done? Using the Modifier you can make the field visible, add it to VBA and then remove the modified window or make the field invisible again. While in the Window Layout mode, make sure that the Invisible fields are shown (Layout >> Show Invisible Fields) and then change the Visual Property, Visible = true and mov...

Counting Null Values in a Report
I have a report that is grouped by people, then by Reason Closed. I want to count how many entries do not have a closed date. I tried the previous posts but could not get it to work. I have a group header for each person to group their categories together. Thanks. Hi Dea, Try: =Sum(-IsNull([ClosedDateFieldName])) Note the minus sign just after the first paranthesis. IsNull() returns a -1 when the item is null, otherwise 0. So by summing up the negative of each (-1)s you are in essence counting 1 for each null item. Alternatively you could move the minus...

Hide Picklist based on value of other picklist.
On the accounts form i have made a new picklist named Partner. In the picklist Customertype i have made a new entry called partner. When someone opens the form i want the picklist named partner to be hidden. When someone selects Partner in the Customertype picklist i want the picklist partner to be visible. If an other value is selected the fields needs to stay hidden. I know i have to make some code on the onchange of the field customertype and i need to make code on the onload of the page. I have tried multiple codes but i cant get it to work. Can someone please help me out please. Hi,...

Corrupt record in Money 2004
I have one record in my .mny file that I can't clear when I try to accept it after it has downloaded from my credit card site. I keep getting the message that the transaction cannot be entered and it remains outstanding - bolded. I tried the salvage processes - msmoney.exe -s and salv.exe. Neither worked. I just want to delete this one record and put it back manually. Is there a way to do this with jet database functionality? Not that is exposed to any of us users. The database is actually "msisam"--a buttoned up derivative of Jet. "Bill Boffi" <anonymo...

Can get UserProperty Names but not Values?
>From C++ using UserProp->Name I can get the name of a UserProperty, but UserProp->Value.bstrVal always returns nothing, anyone have any ideas what I could be doing wrong and has anyone ever accessed UserProperties from C++? UserPropertiesPtr UserProps = Con->UserProperties; if (UserProps->Count > 0) { tot = UserProps->Count; UserPropertyPtr UserProp; for (i=1;i < tot + 1;i++) { UserProp = UserProps->Item(i); MessageBox(NULL,UserProp->Name,"Test - Name",MB_OK); char* sText; sText = (char*)UserProp->Val...

need an error msge when I attempt to enter a duplicate value in a
I am entering unique serial no. in col A. Can I set up a rule which will not allow a duplicate serial no. entry into another cell? See http://cpearson.com/excel/NoDupEntry.htm In article <FFEF019B-E20C-4177-856A-8D8BD0F0698F@microsoft.com>, "pg23673" <pg23673@discussions.microsoft.com> wrote: > I am entering unique serial no. in col A. Can I set up a rule which will not > allow a duplicate serial no. entry into another cell? Check out the validation in the Data section. select the area of interest (A:A) <data><validation><Settings><C...

display the value of an unbound textbox in a field within a table
I created 3 textboxs to calculate the number of business days between 2 dates. The 3rd textbox contains the value. I now want to have this value displayed in a table field. I'm sure this is easy but I'm a complete novice and have spent far too much time on this already. Can anyone help! Fibi, The general concept of tables is that they are for storage of data in the background. They are not for display of data. That is what forms and reports are for. Therefore, the appearance of the data in the tables is not normally relevant, and the display of calculated values is im...