View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default ComboBox with colors?

Here is one way to provide a colour picker

'-----------------------------*------------------------------*--------------
Private Function GetColorindex(Optional Text As Boolean False) As Long
'-----------------------------*------------------------------*--------------
Dim rngCurr As Range

Set rngCurr Selection
Application.ScreenUpdating False
Range("IV1").Select
Application.Dialogs(xlDialogPatterns).Show
GetColorindex ActiveCell.Interior.ColorIndex
If GetColorindex xlColorIndexAutomatic And Not Text Then
GetColorindex xlColorIndexNone
End If
ActiveCell.Interior.ColorIndex xlColorIndexAutomatic
rngCurr.Select
Set rngCurr ActiveSheet.UsedRange
Application.ScreenUpdating True
End Function

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Ctech" wrote in
message ...

Hi

I'm trying to make a macro which sums up all cells in a range with a
certain color.

However Im trying to find a userfriendly way to pick the color.

Is it possible to use the color picker in the tool bar, like an excel
object?
If not is it possible to get a combo box to have background colors on
eaech case?

Cheers


--
Ctech


------------------------------------------------------------------------
Ctech's Profile:

http://www.excelforum.com/member.php...o&userid=27745
View this thread: http://www.excelforum.com/showthread...hreadid=515244