![]() |
How do I change the color Excel Autoshape using VBA?
I'm trying to change the color of an Autoshape I've drawn on a spreadsheet
base on the value of a given cell. Can anybody help me? |
How do I change the color Excel Autoshape using VBA?
hi Jmtricker
how about something like this: activesheet.shapes("yourshape").color = RGB(Cell1,Cell2,Cell3) the name and the correct syntax for the shape i would lookup with recording a macro and then putting it together. Although when you record a macro, excel always uses select, you can write it without the select. If there is any problem you can also post the code the recorded Macro and we can have a look at it. hth Carlo "jmtricker" wrote: I'm trying to change the color of an Autoshape I've drawn on a spreadsheet base on the value of a given cell. Can anybody help me? |
How do I change the color Excel Autoshape using VBA?
Slight correction - the syntax is:
ActiveSheet.Shapes("yourshape").Fill.ForeColor.RGB = RGB(Cell1, Cell2, Cell3) |
All times are GMT +1. The time now is 12:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com