Formatting Charts Using Macros

N

neesie214

Hi,

How do I create and run a macro to format a bar graph in Excel? For example,
I want to change a bar to brown and then apply a gradient. Formatting text
seems easy enough, but I don't know how to create macros to format colors in
charts.

Thanks!
 
J

Jon Peltier

If you have Excel 2003 or earlier, you can simply turn on the macro
recorder, perform the formatting manually, then examine the recorded code.
It won't be efficient code, but it will work, and it will give you the
syntax needed. I've written a couple guidelines for fixing up your recorded
macros:

http://peltiertech.com/WordPress/how-to-fix-a-recorded-macro/
http://peltiertech.com/WordPress/make-recorded-macro-independent-of-sheet/

If you are using Excel 2007, you can still use macros from 2003, usually
without major changes. However, the macro recorder doesn't record any
formatting you perform on shapes or charts. You could try using the help
files, but for over two years I've struggled with them.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top