EXCEL and interior color

Post Reply
User avatar
MarcoBoschi
Posts: 1070
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

EXCEL and interior color

Post by MarcoBoschi »

The question is very simply
I want to colorize the cells interior using a color present in theme colors dialog.
In this way the user can manipulate an excel workshet using the same color i an easiste way

oAs:Range( "A1:K1" ):Interior:Color:= RGB( 244, 176 , 132 )

in my opinion an expression like this does not set a color present in theme colors dialog

oAs:Range( "A1:K1" ):Interior:Color:= Interior:ColorIndex := 40

Bye to all
Marco
Marco Boschi
info@marcoboschi.it
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: EXCEL and interior color

Post by karinha »

Look, pls.

https://fivewin.com.br/index.php?/topic ... ent-263150

Code: Select all | Expand

/*
1-Black; 2-White; 5-Blue; 41-Light Blue; 11-Dark Blue; 10-Green; 3-Red; 6-Yellow; 53-Brown; 13-Violet; 46-Orange; 7-Pink
*/

oSheet:Cells(1,2):Font:ColorIndex := 1
oSheet:Cells(2,2):Interior:ColorIndex := 5

/*
1-Preto ; 2-Branco ; 5-Azul ; 41-Azul Claro ; 11-Azul Escuro ; 10-Verde ; 3-Vermelho ; 6-Amarelo ; 53-Marron ; 13-Violeta ; 46-Laranja ; 7-Rosa
*/
 
https://fivewin.com.br/index.php?/topic ... plication/

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
MarcoBoschi
Posts: 1070
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: EXCEL and interior color

Post by MarcoBoschi »

hi,
The Interior:ColorIndex return otrher colors different from that of theme colors dialog.
Is there a list of that colors?
have a look here https://learn.microsoft.com/en-us/offic ... colorindex
Marco Boschi
info@marcoboschi.it
User avatar
MarcoBoschi
Posts: 1070
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: EXCEL and interior color

Post by MarcoBoschi »

I refuse I'm sorry

:shock:
Marco Boschi
info@marcoboschi.it
Post Reply