[RESOLVED] [VB6] Coloring Excel Cell from VB6
Hi Guys,
Do you have any idea how to set excel cell from VB6 Codes?
Set ExlObj = CreateObject("excel.application")
ExlObj.ActiveSheet.Cells(1, 1).Columns.ColumnWidth = 18
ExlObj.ActiveSheet.Cells(l, m).Rows.BackColor = vbGreen << IS NOT WORKING
Thanks,
Jefri
Re: [VB6] Coloring Excel Cell from VB6
Got it already :)
You can use ColorIndex (to use one of the 56 "preset" colors in Excel):
ActiveCell.Interior.ColorIndex = 36
Or you can use Color:
Range("A1:G6").Interior.Color = RGB(200,160,35)