ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How To: Get the index value of the selected color (https://www.excelbanter.com/excel-programming/285003-how-get-index-value-selected-color.html)

KM[_2_]

How To: Get the index value of the selected color
 
Hi,
If a use the following code to show the Colour Palette
dialog box, how to I retrieve the selected colour index
value. Application.Dialogs(xlDialogColorPalette).Show

TIA
K

Tom Ogilvy

How To: Get the index value of the selected color
 
This is the same as selecting it from the menu - it doesn't return the color
selected - it applies it to the activecell. You would have to read the
value of the interior.ColorIndex of the activecell after the user makes a
selection and it is applied. You cant use this dialog as a general interface
for having the user select a color.

--
Regards,
Tom Ogilvy

"KM" wrote in message
...
Hi,
If a use the following code to show the Colour Palette
dialog box, how to I retrieve the selected colour index
value. Application.Dialogs(xlDialogColorPalette).Show

TIA
K





All times are GMT +1. The time now is 04:50 PM.

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