N
Nunya
Hey guys.
I have a macro which grabs a font selection and injects it into a
cell dynamically. I want to do the same thing with cell color
formatting. I currently use a drop down list to set the value of a
couple of variables which I use in the macro. I want to do the same
thing with the ability to grab a cell's color value, then assign it to
the target cell.
My Font grabbing code is quoted below. I think I only need a slight
variant of that, but am not sure. See if you can re-direct my code
use better, please.
Place this code in your VB editor to make the ZAP symbol work right.
Sub FlipFont()
'
' FlipFont Macro
' Gathering the value of a cell does not gather the font
'
Range("I4").Select
With Selection.Font
.Name = Range("H5").Value
.Size = 112
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
End Sub
I think that if I can inject the "ThemeColor" value, I can get what I
need. So all I should have to do is replace the hard coded value with
a dynamic string. Any help greatly appreciated.
I have a macro which grabs a font selection and injects it into a
cell dynamically. I want to do the same thing with cell color
formatting. I currently use a drop down list to set the value of a
couple of variables which I use in the macro. I want to do the same
thing with the ability to grab a cell's color value, then assign it to
the target cell.
My Font grabbing code is quoted below. I think I only need a slight
variant of that, but am not sure. See if you can re-direct my code
use better, please.
Place this code in your VB editor to make the ZAP symbol work right.
Sub FlipFont()
'
' FlipFont Macro
' Gathering the value of a cell does not gather the font
'
Range("I4").Select
With Selection.Font
.Name = Range("H5").Value
.Size = 112
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
End Sub
I think that if I can inject the "ThemeColor" value, I can get what I
need. So all I should have to do is replace the hard coded value with
a dynamic string. Any help greatly appreciated.