Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
hookfault
 
Posts: n/a
Default COMMAND BUTTONS and CELL COLOR

My worksheet is a usable form with cells that are selected by changing thier
color. If the cell is a certain color, the reader of the form knows which
selection the creator has made. For example there are two imformational
criteria, one set listed along a row and the other in the left column. The
user will select the aplicable info in the top row and left column and change
the color of the cell where they meet. This tells the reader what both
criteria were met. basily a grid. I want an easy way for the form user to
change the color of the cell without having to format the cell each time

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default COMMAND BUTTONS and CELL COLOR


Does 'usable form' mean a worksheet, or a UserForm ?

If you mean a cell on a worksheet, you can format the toolbar (next to
the B I U buttons for Bold, Italic and Underline) to show FillColour,
and then select the colour for the currently selected (highlighted)
cell.

If you mean a UserForm a simple click into the cell, or a click on the
Form column top and row edge, could amend the colour.

Does this help?

--

hookfault Wrote:
My worksheet is a usable form with cells that are selected by changing
thier
color. If the cell is a certain color, the reader of the form knows
which
selection the creator has made. For example there are two
imformational
criteria, one set listed along a row and the other in the left column.
The
user will select the aplicable info in the top row and left column and
change
the color of the cell where they meet. This tells the reader what both
criteria were met. basily a grid. I want an easy way for the form user
to
change the color of the cell without having to format the cell each
time



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=531691

  #3   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach
 
Posts: n/a
Default COMMAND BUTTONS and CELL COLOR

Not sure what you are doing but I'll give it a shot. You mention Command
Buttons in the subject of your post but say nothing about buttons in the
post. I think you want an easy way for the user to change the color of a
cell. I gather from what you say that the various colors the user might
want for a cell is limited to just 2 or 3. Is this correct?
I would use a Worksheet_SelectionChange event macro. The code would be
written to cycle through the various colors as the user clicks on the cell.
In other words, if the user clicks on the cell, the color of the cell would
change to Color1. If he clicks on the cell again, the color would change to
Color2, and so forth, until he gets the color he wants. Is this something
that you think would work for you? The code would look something like the
following. Note that this is a sheet macro and must be placed in the sheet
module of the sheet in question. To access that module, right-click on the
sheet tab, select View Code, and paste this macro into that module. Click
on the "X" in the top right corner of the module to return to the sheet.
This macro will cycle from no color to yellow to red to blue to no color in
that order. If you have more than these 4 colors, I would change the code
and use a Select Case construct. Post back if that is the case. HTH Otto
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Not Intersect(Target, Range("C3:H19")) Is Nothing Then
If Target.Interior.ColorIndex = xlNone Then
Target.Interior.ColorIndex = 6
Else
If Target.Interior.ColorIndex = 6 Then
Target.Interior.ColorIndex = 3
Else
If Target.Interior.ColorIndex = 3 Then
Target.Interior.ColorIndex = 5
Else
If Target.Interior.ColorIndex = 5 Then _
Target.Interior.ColorIndex = xlNone
End If
End If
End If
End If
Application.EnableEvents = False
Range("C2").Select
Application.EnableEvents = True
End Sub
"hookfault" wrote in message
...
My worksheet is a usable form with cells that are selected by changing
thier
color. If the cell is a certain color, the reader of the form knows which
selection the creator has made. For example there are two imformational
criteria, one set listed along a row and the other in the left column. The
user will select the aplicable info in the top row and left column and
change
the color of the cell where they meet. This tells the reader what both
criteria were met. basily a grid. I want an easy way for the form user to
change the color of the cell without having to format the cell each time



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
Macro To Change Cell Color When Value Changes carl Excel Worksheet Functions 4 March 14th 06 08:24 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Cell Change Color - Need Help alani New Users to Excel 3 June 29th 05 03:50 PM
Color a cell and a value is automatically assigned to that color. Bossi Excel Worksheet Functions 0 May 3rd 05 05:45 AM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM


All times are GMT +1. The time now is 04:44 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"