walker1985
08-04-2015, 03:49 AM
Hi Guys
I apologise if this is in the incorrect place but was wondering if you could help, I currently have a rota that we use with a series of macro's recorded that when pressed will fill the active cell with a color and text, they work fine, the issue is they currently use color index whic as you all know is limited to a set number of colors, I want to change interior fill from color index to RGB to be able to get better color match, Here is some exsisting code which works fine I just need RGB instead of index any help would be greatly appriciated
Sub EDI()
Application.ScreenUpdating = False
Selection.Value = "EDI"
With Selection.Interior
.ColorIndex = 17
.Pattern = xlSolid
End With
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
ActiveCell.Offset(1, 0).Range("A1").Select
End Sub
I apologise if this is in the incorrect place but was wondering if you could help, I currently have a rota that we use with a series of macro's recorded that when pressed will fill the active cell with a color and text, they work fine, the issue is they currently use color index whic as you all know is limited to a set number of colors, I want to change interior fill from color index to RGB to be able to get better color match, Here is some exsisting code which works fine I just need RGB instead of index any help would be greatly appriciated
Sub EDI()
Application.ScreenUpdating = False
Selection.Value = "EDI"
With Selection.Interior
.ColorIndex = 17
.Pattern = xlSolid
End With
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
ActiveCell.Offset(1, 0).Range("A1").Select
End Sub