excel vba - VBA code to bring over background color of a cell -
i trying figure out if there code out there re-create on background color of cell. instance cell a1 had background color of white decided wanted highlight cell yellow, possible bring on color formatting vba code?
try this:
sub macro1() range("a1").style = "neutral" 'select whatever cell want alter 'this style kinda yellowish range("a2").style = "accent6" 'select whatever cell want alter 'this style orange 'you have utilize whatever accent want end sub
you'll have adapt little use. allow me know if helps!
just tried else. 1 changes fill color, not style.
range("a3").select selection.interior .pattern = xlsolid .patterncolorindex = xlautomatic .color = 65535 .tintandshade = 0 .patterntintandshade = 0 end
excel-vba
No comments:
Post a Comment