Jump to content
Sign in to follow this  
ToyBoi

VBA question regarding changing the colour of stacked columns

Recommended Posts

ToyBoi

I hope everyone doesn't mind that I'm asking a question regarding vba in this forum, but Ozgrid is charging $1 for each topic!

Posted Image

In the above picture, I have a stacked bar graph. the first stack is light blue, the second is maroon, and the last is light yellow. How do I get vba to change those colours to what I want. I recorded macros for this but it doesn't work for stacked columns. The following is the code when I tried to record a macro.

With Selection.Interior
        .ColorIndex = 48
        .PatternColorIndex = 1
        .Pattern = 1
    End With
    ActiveChart.PlotArea.Select
    With Selection.Border
        .ColorIndex = 16
        .Weight = xlThin
        .LineStyle = xlContinuous
    End With
    With Selection.Interior
        .ColorIndex = 56
        .PatternColorIndex = 1
        .Pattern = xlSolid
    End With

It said that the system doesn't support this operation.

Edited by ToyBoi

Share this post


Link to post
Share on other sites
PsaltyDS

I hope everyone doesn't mind that I'm asking a question regarding vba in this forum, but Ozgrid is charging $1 for each topic!

So, you thought you would run up the hosting bills for AutoIt instead?

Please don't use the AutoIt forums for off-topic questions. If you are a regular AutoIt user aside from this question, then you could probably get help in the Chat forum.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.