Hi,
I have a table that stores the field name in column 1 then the colour code in column 2 (see below) in the VBA code I am trying to use the Colour code. If I use it as a number it works but I can't work out the correct number for the RGB codes I have. How do I pass the array variable?
[TABLE="width: 287"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Column 1 [/TD]
[TD]Column 2 [/TD]
[TD] RGB Code[/TD]
[/TR]
[TR]
[TD]Coxes Apples[/TD]
[TD]16225862 [/TD]
[TD]247,150,70[/TD]
[/TR]
[TR]
[TD]Bramley Apples[/TD]
[TD]16225862[/TD]
[TD]247,150,70[/TD]
[/TR]
[TR]
[TD]Commice Pears[/TD]
[TD]1515077[/TD]
[TD]23,30,69[/TD]
[/TR]
[TR]
[TD]Conference Pears[/TD]
[TD]1515077[/TD]
[TD]23,30,69[/TD]
[/TR]
</tbody>[/TABLE]
The Array of Column 1 and Column 2 is called arrAssetClass
Range("B" & Rowcount).Interior.Color = arrAssetClass(AssetClassRow, 2)
Any ideas how I can get the correct number code or pass the RGB or Hex code?
Thanks,
Mike
I have a table that stores the field name in column 1 then the colour code in column 2 (see below) in the VBA code I am trying to use the Colour code. If I use it as a number it works but I can't work out the correct number for the RGB codes I have. How do I pass the array variable?
[TABLE="width: 287"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Column 1 [/TD]
[TD]Column 2 [/TD]
[TD] RGB Code[/TD]
[/TR]
[TR]
[TD]Coxes Apples[/TD]
[TD]16225862 [/TD]
[TD]247,150,70[/TD]
[/TR]
[TR]
[TD]Bramley Apples[/TD]
[TD]16225862[/TD]
[TD]247,150,70[/TD]
[/TR]
[TR]
[TD]Commice Pears[/TD]
[TD]1515077[/TD]
[TD]23,30,69[/TD]
[/TR]
[TR]
[TD]Conference Pears[/TD]
[TD]1515077[/TD]
[TD]23,30,69[/TD]
[/TR]
</tbody>[/TABLE]
The Array of Column 1 and Column 2 is called arrAssetClass
Range("B" & Rowcount).Interior.Color = arrAssetClass(AssetClassRow, 2)
Any ideas how I can get the correct number code or pass the RGB or Hex code?
Thanks,
Mike