ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CUstom color is not showing (https://www.excelbanter.com/excel-programming/367661-custom-color-not-showing.html)

San

CUstom color is not showing
 
Hai all,

$excel_app = new COM("Excel.Application");
$excel_app-SheetsInNewWorkbook=2;
$workbook = $excel_app-Workbooks-add();
$workbook-Colors[15]=hexdec("ABCDEF");

Im trying to assing color like the above code.But the custom colors are not
appearing for the cells. Its automatically converted to the 1-56 color
indexed and no error is showing.
Thanks in advance
San.



Tom Ogilvy

CUstom color is not showing
 
Your code appears to be changing the definition of the 15th color in the
color pallet of 56 colors. If you have any cells that have their
interior.colorindex property set to 15, then they should take on the
appearance of your new color.


--
Regards,
Tom Ogilvy


"San" wrote:

Hai all,

$excel_app = new COM("Excel.Application");
$excel_app-SheetsInNewWorkbook=2;
$workbook = $excel_app-Workbooks-add();
$workbook-Colors[15]=hexdec("ABCDEF");

Im trying to assing color like the above code.But the custom colors are not
appearing for the cells. Its automatically converted to the 1-56 color
indexed and no error is showing.
Thanks in advance
San.




All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com