Basically, just provide the user with the ability to select a colour. I am
building a dialog for modifying cell properties and part of that is the
ability to choose a font and back colour. There's quite a bit more to it
than that, but that is the basic need for a colour chooser.
I would love to be able to access built-in dialogs for what I am doing, such
as the Format Cells dialog, that then returns the users selections, so I can
then apply them as I want, but can't find a way of doing that.
Jeff
"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
Jeff, there may be a better way depending on what you are trying to
accomplish with the color picker. Can you provide a little more detail on
what you want to use the color for?
Also, John Walkenbach's Color Picker may do the trick for you:
http://j-walk.com/ss/excel/tips/tip49.htm
--
Vasant
"Jeff" wrote in message
...
Hi Vasant
Is there a better way of doing this? I can't find any other way, short
of
building a custom for, to display a suitable dialog.
Jeff
"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
Private Declare Function FindWindow Lib _
"user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long
Dim hWnd As Long
hWnd = FindWindow("XLMAIN", Application.Caption)
However, since Excel can only handle the 56 colors that are in the
palette
associated with each workbook, I'm not sure how useful the ChooseColor
function will be.
--
Vasant
"Jeff" wrote in message
...
Hi All
I am using an API function and have to pass the Excel window handle.
I
have,
in vain, tried to figure this out. How do you get the window handle.
I
tried
xlGetHwnd which seemed to work but now it doesn't, which is really
strange?
The API function is ChooseColor. This is so I can display a dialog
for
choosing a color. If anybody knows another way of displaying a
colour
choosing dialog this would also be good.
Jeff