Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ComboBox with colors?


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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ComboBox with colors?


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default ComboBox with colors?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
All colors in Office documents are grayscale, how do I see colors JT Excel Discussion (Misc queries) 1 February 2nd 10 02:13 PM
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
Worksheet formatting (fill colors & text colors) disappeared sweettooth Excel Discussion (Misc queries) 2 June 24th 08 01:16 AM
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM
Can't format font colors or cell fill-in colors canoeron Excel Discussion (Misc queries) 3 August 22nd 05 11:46 PM


All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"