ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Display color (or Format Cells) dialog in a macro? (https://www.excelbanter.com/excel-programming/331895-display-color-format-cells-dialog-macro.html)

Mick

Display color (or Format Cells) dialog in a macro?
 
If I use the following in a macro, how can I get the selected color after the
user clicks the OK button? Is there another way to display a color selection
dialog?

Or, better yet, how can I display the 'Format Cells' dialog in a macro?


Dim bResult As Boolean
bResult = Application.Dialogs(xlDialogColorPalette).Show



Tom Ogilvy

Display color (or Format Cells) dialog in a macro?
 
The selected cell will be formatted when the user makes a selection from the
dialog.

So you can read the color from the cell.

Or, better yet, how can I display the 'Format Cells' dialog in a macro?

application.CommandBars("Format").Controls(C&ells. ..").Execute




--
Regards,
Tom Ogilvy

"Mick" wrote in message
...
If I use the following in a macro, how can I get the selected color after

the
user clicks the OK button? Is there another way to display a color

selection
dialog?

Or, better yet, how can I display the 'Format Cells' dialog in a macro?


Dim bResult As Boolean
bResult = Application.Dialogs(xlDialogColorPalette).Show






All times are GMT +1. The time now is 02:30 PM.

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