Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors programatically
What code do I use on a command button that will let the user choose a color
for interior and font. Thanks you, Steven |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors programatically
With ActiveSheet.ActiveCell
.Interior.ColorIndex = 5 .Font.ColorIndex = 1 End With "Steven" wrote: What code do I use on a command button that will let the user choose a color for interior and font. Thanks you, Steven |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors programatically
Thank you for the response. What I am looking for is to open up the palate
so they can choose their own color. "JLGWhiz" wrote: With ActiveSheet.ActiveCell .Interior.ColorIndex = 5 .Font.ColorIndex = 1 End With "Steven" wrote: What code do I use on a command button that will let the user choose a color for interior and font. Thanks you, Steven |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors programatically
You wanted code to choose a color, not assign it. How many options do you
intend to offer out of the 56 available, or will they be able to just randomly select? You could set up a ListBox with the color name and let the user choose from that. The the code behind the ListBox could tell which cell to apply the selected value to. Using an Inputbox would require the options to be spelled out somewhere, possibley in the InputBox narrative, for the user to know what to enter in the input window. Give me some idea of how you want to handle the option criteria and I can give you some code for it. "JLGWhiz" wrote: With ActiveSheet.ActiveCell .Interior.ColorIndex = 5 .Font.ColorIndex = 1 End With "Steven" wrote: What code do I use on a command button that will let the user choose a color for interior and font. Thanks you, Steven |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors programatically
For the font color:
Application.Dialogs(xlDialogFormatFont).Show or Application.Dialogs(xlDialogFontProperties).Show For the pattern/fill: Application.Dialogs(xlDialogPatterns).Show Steven wrote: What code do I use on a command button that will let the user choose a color for interior and font. Thanks you, Steven -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors programatically
Very nice. Thank you. "Dave Peterson" wrote: For the font color: Application.Dialogs(xlDialogFormatFont).Show or Application.Dialogs(xlDialogFontProperties).Show For the pattern/fill: Application.Dialogs(xlDialogPatterns).Show Steven wrote: What code do I use on a command button that will let the user choose a color for interior and font. Thanks you, Steven -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Colors programatically
myColor = Application.Dialogs(xlDialogColorPalette)
will return the palette but it will not allow you to select the color and store it in the variable. Seem sort of dumb to me, but I tried two or three different approaches and it keeps saying it can't get the value. Think it over and see what else you can do. "Steven" wrote: Thank you for the response. What I am looking for is to open up the palate so they can choose their own color. "JLGWhiz" wrote: With ActiveSheet.ActiveCell .Interior.ColorIndex = 5 .Font.ColorIndex = 1 End With "Steven" wrote: What code do I use on a command button that will let the user choose a color for interior and font. Thanks you, Steven |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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) |