Link to home
Start Free TrialLog in
Avatar of csehz
csehzFlag for Hungary

asked on

VBA Excel 2000 - Basic colors handling

Dear Experts,

Could you propose a reliable way of using VBA commands about font coloring?

I am aware two versions for example to blue
Worksheets("Sheet1").Range("A1").Font.ColorIndex = 6 - this using the place of color from pallet
Worksheets("Sheet1").Range("A1").Font.Color = 16711680 - this would set the blue color, but as I perceive at default color pallet settings, it became yellow :-)

Is there maybe chance to use RGB values in VBA?

thanks,
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of csehz

ASKER

Thanks, so I assume to make sure using blue, this should be added always to the workbook

    ActiveWorkbook.ResetColors

and after selecting the blue from the palette, which will be always on the same place in this way

    Selection.Font.ColorIndex = 5