Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I can format shapes with RGB
ActiveSheet.Shapes("Test").Fill.ForeColor.RGB = RGB(128, 128, 128) Is there a way to format a shape using themecolors in the same way you can format a cell With Range("A1").Interior .ThemeColor = xlThemeColorAccent3 .TintAndShade = 0.799981688894314 End With I have tried every variation of the code & syntax to no avail - could someone give me an example of the code to do this please - thankyou in anticipation |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is the sort of syntax you are looking for:
ActiveSheet.Shapes.Range(Array("Test")).Select With Selection.ShapeRange.Fill .Visible = msoTrue .ForeColor.ObjectThemeColor = msoThemeColorAccent3 .ForeColor.TintAndShade = 0.8 .Transparency = 0 .Solid End With With Selection.ShapeRange.Line .Visible = msoTrue .ForeColor.ObjectThemeColor = msoThemeColorAccent6 .ForeColor.TintAndShade = 0.4 .Transparency = 0 End With You can drop things like transparency and solid if you won't need to change them, but sometimes it is better to be sure (eg colours will look wrong if the transparency is not 0). For TintAndShade I tend to use rounded numbers, although they won't exactly match the choices in the gallery (but it also means you have easy access to a wider range if you want to, while remaining 'theme aware') Hope this helps Adam Roger wrote: I can format shapes with RGB ActiveSheet.Shapes("Test").Fill.ForeColor.RGB = RGB(128, 128, 128) Is there a way to format a shape using themecolors in the same way you can format a cell With Range("A1").Interior .ThemeColor = xlThemeColorAccent3 .TintAndShade = 0.799981688894314 End With I have tried every variation of the code & syntax to no avail - could someone give me an example of the code to do this please - thankyou in anticipation |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format Shape, will not move accordingly, when deleting columns | Excel Discussion (Misc queries) | |||
my curser changed from arrow shape to a cross shape???? | New Users to Excel | |||
can I use conditional format on an auto shape | Excel Discussion (Misc queries) | |||
conditinal format that gives particular shape and color in cell | Excel Discussion (Misc queries) | |||
Chart in a Shape | Excel Discussion (Misc queries) |