Background color

  • Thread starter Thread starter kirkm
  • Start date Start date
K

kirkm

Hi, Can someonr help me with the following?

It's variable mCol. I'm after the background color of the cell
(which isn't .Font.Background).

Thanks - Kirk


Dim x: x = InputBox("Column?") & "2"
Dim rng As Range
Dim MyLastRow, mFont, mSize, mCol
Stop
Set rng = Worksheets("Sheet1").Range(x)

With rng
mFont = .Font.Name
mSize = .Font.Size
mCol = .Font.Background
End With

Stop
 
Hi, Can someonr help me with the following?

It's variable mCol. I'm after the background color of the cell
(which isn't .Font.Background).

Thanks - Kirk

Dim x: x = InputBox("Column?") & "2"
Dim rng As Range
Dim MyLastRow, mFont, mSize, mCol
Stop
Set rng = Worksheets("Sheet1").Range(x)

With rng
mFont = .Font.Name
mSize = .Font.Size
mCol = .Font.Background
End With

Stop

Hi,
Change your variable code to this...

mCol = .Interior.ColorIndex

Sincerely,
Leith Ross
 
Back
Top