Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default RGB Colors of "Fill Color"

Thanks for taking the time to read my question.

I want to make a form on which the user can choose the fill color. I want
to have something that looks like what you find on the Formatting tool bar
for Fill Color. I thought I'd use option boxes inside a group. Instead of
having a caption, I thought I'd just set the BackColor to the fill color to
be used.

My problem is that when you drop down the BackColor list in the Properties
box, it doesn't give you many options Pallet or otherwise. I thought I could
set the BackColor programatically, but I can't seem to find the RGB values of
the available colors.

Thanks,

Brad
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default RGB Colors of "Fill Color"

Brad,

You could add a picker button on the form to call the built-in colour dialog
Function ReturnColorindex() As Long
Dim rngCurr As Range
Set rngCurr = Selection
Application.ScreenUpdating = False
Range("IV1").Select
Application.Dialogs(xlDialogPa*tterns).Show
ReturnColorindex = ActiveCell.Interior.ColorIndex
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
rngCurr.Select
End Function


--
HTH

Bob Phillips

"Brad" wrote in message
...
Thanks for taking the time to read my question.

I want to make a form on which the user can choose the fill color. I want
to have something that looks like what you find on the Formatting tool bar
for Fill Color. I thought I'd use option boxes inside a group. Instead

of
having a caption, I thought I'd just set the BackColor to the fill color

to
be used.

My problem is that when you drop down the BackColor list in the Properties
box, it doesn't give you many options Pallet or otherwise. I thought I

could
set the BackColor programatically, but I can't seem to find the RGB values

of
the available colors.

Thanks,

Brad



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default RGB Colors of "Fill Color"

Hi Bob,

Thanks for the code.

I put it into my form, and called it on the Click event of a button


Private Sub CommandButton1_Click()
MsgBox ReturnColorindex
End Sub

Your code gets stuck on [Application.Dialogs(xlDialogPaÂ*tterns).Show]

not sure how to fix it.

Brad


"Bob Phillips" wrote:

Brad,

You could add a picker button on the form to call the built-in colour dialog
Function ReturnColorindex() As Long
Dim rngCurr As Range
Set rngCurr = Selection
Application.ScreenUpdating = False
Range("IV1").Select
Application.Dialogs(xlDialogPaÂ*tterns).Show
ReturnColorindex = ActiveCell.Interior.ColorIndex
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
rngCurr.Select
End Function


--
HTH

Bob Phillips

"Brad" wrote in message
...
Thanks for taking the time to read my question.

I want to make a form on which the user can choose the fill color. I want
to have something that looks like what you find on the Formatting tool bar
for Fill Color. I thought I'd use option boxes inside a group. Instead

of
having a caption, I thought I'd just set the BackColor to the fill color

to
be used.

My problem is that when you drop down the BackColor list in the Properties
box, it doesn't give you many options Pallet or otherwise. I thought I

could
set the BackColor programatically, but I can't seem to find the RGB values

of
the available colors.

Thanks,

Brad




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default RGB Colors of "Fill Color"

Brad,

I think it is a Google problem.

If you look at the code in the VB IDE, you will probably see it says

Application.Dialogs(xlDialogPa-*tterns).Show

that is an extra -. Remove that -, to

Application.Dialogs(xlDialogPatterns).Show

--
HTH

Bob Phillips

"Brad" wrote in message
...
Hi Bob,

Thanks for the code.

I put it into my form, and called it on the Click event of a button


Private Sub CommandButton1_Click()
MsgBox ReturnColorindex
End Sub

Your code gets stuck on [Application.Dialogs(xlDialogPa*tterns).Show]

not sure how to fix it.

Brad


"Bob Phillips" wrote:

Brad,

You could add a picker button on the form to call the built-in colour

dialog
Function ReturnColorindex() As Long
Dim rngCurr As Range
Set rngCurr = Selection
Application.ScreenUpdating = False
Range("IV1").Select
Application.Dialogs(xlDialogPa*tterns).Show
ReturnColorindex = ActiveCell.Interior.ColorIndex
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
rngCurr.Select
End Function


--
HTH

Bob Phillips

"Brad" wrote in message
...
Thanks for taking the time to read my question.

I want to make a form on which the user can choose the fill color. I

want
to have something that looks like what you find on the Formatting tool

bar
for Fill Color. I thought I'd use option boxes inside a group.

Instead
of
having a caption, I thought I'd just set the BackColor to the fill

color
to
be used.

My problem is that when you drop down the BackColor list in the

Properties
box, it doesn't give you many options Pallet or otherwise. I thought

I
could
set the BackColor programatically, but I can't seem to find the RGB

values
of
the available colors.

Thanks,

Brad






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default RGB Colors of "Fill Color"

Hi Bob,

I found the problem. I should have noticed it right away... bit of a brain
stall there.

Thanks,

Brad

"Bob Phillips" wrote:

Brad,

You could add a picker button on the form to call the built-in colour dialog
Function ReturnColorindex() As Long
Dim rngCurr As Range
Set rngCurr = Selection
Application.ScreenUpdating = False
Range("IV1").Select
Application.Dialogs(xlDialogPaÂ*tterns).Show
ReturnColorindex = ActiveCell.Interior.ColorIndex
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
rngCurr.Select
End Function


--
HTH

Bob Phillips

"Brad" wrote in message
...
Thanks for taking the time to read my question.

I want to make a form on which the user can choose the fill color. I want
to have something that looks like what you find on the Formatting tool bar
for Fill Color. I thought I'd use option boxes inside a group. Instead

of
having a caption, I thought I'd just set the BackColor to the fill color

to
be used.

My problem is that when you drop down the BackColor list in the Properties
box, it doesn't give you many options Pallet or otherwise. I thought I

could
set the BackColor programatically, but I can't seem to find the RGB values

of
the available colors.

Thanks,

Brad




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
Incorporating Cell color fill in an "if" logical function? George_Sky Excel Worksheet Functions 46 April 4th 23 02:18 PM
Can Excel's field fill colors be changed using "IF" statements? JHG Excel Worksheet Functions 3 May 8th 09 01:17 PM
Where (menu) find "fill color" and define/add a new color? Claudia d'Amato Excel Discussion (Misc queries) 1 November 16th 08 11:21 AM
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
Excel needs multiple "Fill color" buttons for faster coloring. SC0718 Setting up and Configuration of Excel 1 May 23rd 07 01:37 PM


All times are GMT +1. The time now is 12:56 PM.

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"