Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Incorporating Cell color fill in an "if" logical function? | Excel Worksheet Functions | |||
Can Excel's field fill colors be changed using "IF" statements? | Excel Worksheet Functions | |||
Where (menu) find "fill color" and define/add a new color? | Excel Discussion (Misc queries) | |||
Used drawing colors in shapes....lost default colors for "Fill Col | Excel Discussion (Misc queries) | |||
Excel needs multiple "Fill color" buttons for faster coloring. | Setting up and Configuration of Excel |