Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How do I use this Function? Do I have to run it in another macro, if so how? When I paste this into a new module... I get several errors i.e Set rngCurr Selection ----- should it be Set rngCurr = Selectio -- Ctec ----------------------------------------------------------------------- Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774 View this thread: http://www.excelforum.com/showthread.php?threadid=51524 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I assumed that you had some VBA to use a colour, so this would need to be
integrated with it. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ctech" wrote in message ... How do I use this Function? Do I have to run it in another macro, if so how? When I paste this into a new module... I get several errors i.e Set rngCurr Selection ----- should it be Set rngCurr = Selection -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=515244 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
All colors in Office documents are grayscale, how do I see colors | Excel Discussion (Misc queries) | |||
Used drawing colors in shapes....lost default colors for "Fill Col | Excel Discussion (Misc queries) | |||
Worksheet formatting (fill colors & text colors) disappeared | Excel Discussion (Misc queries) | |||
Lost highlighting and font colors; background colors on web pages | Excel Discussion (Misc queries) | |||
Can't format font colors or cell fill-in colors | Excel Discussion (Misc queries) |