Board index » delphi » I cannot set the colors property of Workbook.Colors[]

I cannot set the colors property of Workbook.Colors[]

Hello,

When I go through next lines in code:

LCID := LOCALE_USER_DEFAULT;
ExcelWorkBook.colors[1,LCID] := RGB(200,200,200);

my delphi compiler generates an error:
"Unable to Set the Colors Property of the workbook class".
Take into account that
- ExcelApplication is OK
- ExcelWorkbook is OK

This is quite basic, but what's wrong? At the other hand, the helpfile  has
another declaration than the Delphi declarations, it needs LCID, the help
file doesn't...?

Many thanks in advance,
Jurgen De Block

 

Re:I cannot set the colors property of Workbook.Colors[]


<<Jurgen De Block:
"Unable to Set the Colors Property of the workbook class".

Quote

I answered this yesterday. It's a bug in the Workbook
component - use Excel.ActiveWorkbook, or an interface
variable, instead.

<<Jurgen:
At the other hand, the helpfile  has another declaration
than the Delphi declarations, it needs LCID, the help
file doesn't...?

Quote

That's normal in the helpfile, which is geared to late
binding - you don't have to specify LCIDs then.

--
Deborah Pate (TeamB) http://delphi-jedi.org

  TeamB don't see posts sent via Google or ISPs
  Use the real Borland server: newsgroups.borland.com
  http://www.borland.com/newsgroups/genl_faqs.html

Other Threads