xlDialogColorPalette argument

  • Thread starter Thread starter Arne
  • Start date Start date
A

Arne

The built-in dialog xlDialogColorPalette requires an argument, which is
stated in the help file simply as "file_text". I suspect it is the file name
of a palette file, but I am not sure. Moreover, I have not been able to
locate a *.pal file on my HDD, so simply trying is not an option. When the
argument is omitted, the "show" method does notr lead to the dialog being
displayed.

Any ideas? Thanks in advance.

Arne
 
This seems to work...
Application.Dialogs(xlDialogColorPalette).Show ActiveWorkbook.Path
However, it will not return the "selected" color.
It is used only to modify the color palette in the workbook.

John Walkenbach has a custom color picker dialog available for download here...
http://www.j-walk.com/ss/excel/tips/tip49.htm

--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins - Special Sort can sort by color)





"Arne" <[email protected]>
wrote in message
The built-in dialog xlDialogColorPalette requires an argument, which is
stated in the help file simply as "file_text". I suspect it is the file name
of a palette file, but I am not sure. Moreover, I have not been able to
locate a *.pal file on my HDD, so simply trying is not an option. When the
argument is omitted, the "show" method does notr lead to the dialog being
displayed.

Any ideas? Thanks in advance.

Arne
 
The dialog does not "require" the optional argument to be included and
probably best not to.

It's misleadingly named and refers to the index of a workbook as if the
workbook's collection were to exclude the activeworkbook. If supplied the
argument serves to pre-select the given workbook in the "copy colors from"
dropdown.

As Jim implied dialogs do not directly return any info other than True or
false to indicate user pressed OK or Cancel (this one errors if user pressed
OK without making changes). To record what the user has done (if anything)
compare Original & New palettes

arrOrig = activeworkbook.colors ' 1-56 array

when done, if user press OK loop compare with arrNew

Regards,
Peter T
 
to clarify -
It's misleadingly named and refers to the index of a workbook

should be -

"file_text" is misleadingly named and refers to the index of a workbook

Peter T
 

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

Back
Top