View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to access the 'color pick window'?

application.Dialogs(xlDialogFontProperties).SHOW

application.Dialogs(xlDialogColorPalette).Show

are possibilities. Probably the second. The act the same as if you showed
them from the menu - they have a specific purpose and you can not use them
for any other. In otherwords, you can't use the second one for anything
other than setting the color to the selection - so the selection must be
something that will work with this dialog, or you get an error. the dialog
itself only returns true or false. False if the user clicks cancel, true
otherwise. If you want to know what color was selected, you will have to
examine the selected object.

--
Regards,
Tom Ogilvy



Jan Nordgreen wrote in message
...
I am using Excel 97.

I would like to know how to use programmatically the window that opens

when
I click 'Fill Color' or 'Font Color' on the Format toolbar.

I need to know how to open it, and how it returns the color the user

chose.

This gives a color window, but not the one I want:
Dim x As CommonDialog
Set x = New CommonDialog
x.ShowColor

Any ideas?

Sincerely,
Jan Nordgreen