I'm really struggling with this one, and can get several results that don't quite do what I want.
I've created a map from several smaller components. So that the background of each segment doesn't obscure the other map sections, I have coloured the background grey (RGB 200,200,200) in the png file.
In Excel, I have then reformatted the picture and set this background colour to be transparent.
What I now have is an unobscured map of overlapping sections, and I want to colour code the visible sections of each differently to identify different regions.
I can do this manually by selecting an object, going to the picture recolour options, and picking a colour. However, I want to do this from VBA as the colour will depend on a value in a cell. The record macro function cannot capture this action.
For the life of me, I cannot find the VBA code to manipulate just the foreground colour (i.e. the bit that isn't transparent). Using the .forecolor and .backcolor handles will only recolour my transparent section (i.e. the background), but it refuses to change the visible section (foreground) colour.
I can force a change using something like this:
but I'm restricted to the coloraccent schemes, of which there are just six pastel shades. I need the full gamut, ideally specified via RGB(x,y,z)!
Please help!
Bookmarks