Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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
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 03:57 PM.

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

About Us

"It's about Microsoft Excel"