Hi I am using these steps http://www.andypope.info/charts/Invertneg.htm
to fill color if negative for my bar graph. But it works only when sheet is active. When when I close that excel workbook and open again. color of bar chart change automatically from red and green to blue and white. I could not figure out why color change automatically whenever I open my sheet again. I was trying to call following sub when sheet become active but that give error 1004 in line 2. I was trying to assign macro to chart. But that works only if I select chart. Is there any solution
Let us assume, that the worksheet you are using is Sheet 1, and the name of the chart is Chart 1. So I will use the following code to ensure that I dont have to select the chart/series/sheet.
That is working but for excel 2003. But when I try to open in excel 2007. There are entirely different colors. red become green. green become white. Thanks
This is because the Excel 2007 works on theme colors and not on the color indexes like in 2003. Do you want to say that the color is being applied correctly in 2003 but not in 2007, or you want to say that when you open the spreadsheet in 2007 after applying color code, the colors are messed up? In either case, please give us a sample spreadsheet to verify.
Attached is sheet that works perfect in excel 2003. But I need same color pettren when opened in Excel 2007. bar with -ve value Green and bar with +ve value red
Thanks
Thanks ...Sorry I sshould mention this before...
I have a workbook that i need to upload online, so that people from different businesses can use this. I am using 2003 excel. But other people can have excel 2007. So I need code that work for both excel 2003 as well as 2007. Your code is working fine separately.
Is there any way same code work for excel 2003 as well as excel 2007.
I have still more problem to tackle people having Mac computer can not use my spreadsheets.
Thanks
Bookmarks