Page 1 of 1

EXCEL and interior color

Posted: Mon Jun 03, 2024 3:49 pm
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

Re: EXCEL and interior color

Posted: Mon Jun 03, 2024 4:44 pm
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.

Re: EXCEL and interior color

Posted: Mon Jun 03, 2024 5:48 pm
by Enrico Maria Giordano
Use CHOOSECOLOR() function instead of a fixed RGB() color.

Re: EXCEL and interior color

Posted: Tue Jun 04, 2024 7:34 am
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

Re: EXCEL and interior color

Posted: Tue Jun 04, 2024 7:38 am
by Enrico Maria Giordano
Ok, I don't know, sotty. Try to ask the AI.

Re: EXCEL and interior color

Posted: Tue Jun 04, 2024 7:46 am
by MarcoBoschi
I refuse I'm sorry

:shock:

Re: EXCEL and interior color

Posted: Tue Jun 04, 2024 7:54 am
by Enrico Maria Giordano
Why? You can write in Italian.