Display color (or Format Cells) dialog in a macro?

M

Mick

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top