Create A Button That Will Change The Color Of ANY Cell
Feb 22, 2007
I need to create a button in Excel that will change the color of ANY cell I want it to.
I have had a play around and I can only create a button that changes the color of one particular cell!
Can I edit the range code in VB in order to apply this to any particular cell?
View 9 Replies
ADVERTISEMENT
Nov 22, 2006
I have a series of 12 option buttons on my spreadsheet named Opt_1 thro' opt_12. Whenever one is pressed, I want to invoke code to action the following:
change forecolor of non-selected option buttons to yellow
change forecolor of the selected option button to red
Enter in Cell A1 the number of the option button slected
So, for example, if Opt_4 was pressed, then
Opt_1 - Opt_3 & Opt_5 - Opt_12 forecolor = yellow
Opt_4 forecolor = red
Cell A1 gets the value of 4 entered into it.
I know how to do this on a user form, by putting the option buttons in a frame and then picking up the array value of the option button, but I have these directly on my spreadsheet next to 12 cells as this is more relevant to my application.
I thought of a Select - Case statement, but this will be rather lengthy. Have you any suggestions on how to tighten this code down.
View 3 Replies
View Related
Sep 17, 2008
My boss wants a spreadsheet that has multiple buttons on it that will change the background color of a specific cell to four different colors. Example:
Text written in Cell B3, Button in Cell A3 that will change the Background color of Cell B3 to either Green, Yellow, Red or Blue.
There will be a lot of buttons on this worksheet following the same format as above. I don't want to change the value of what is in the cell, just the background color.
View 7 Replies
View Related
Mar 1, 2010
i want the user to be able to change the cell color on the click of a command button. the worksheet is protected. when the user click the command button the active cell changes to red and offsets by 1. then the work sheet is locked again.
The two problems I am having is 1. I want the range to begin from row 10, column k to column FD. all cells down
the second problem is the current code allows me to edit locked cell columns A to J ...
View 9 Replies
View Related
Nov 11, 2011
I have a togglebutton for an excel sheet in use for scoring psychological tests. When pressed, the button higlights the cells where a raw score is inserted.
What I need is a code to higlight the togglebutton when pressed, eg. green (colorindex 4). The button is white. How to do this?
Below is the code, It has more lines than needed, but it works.
Private Sub ToggleButton1_Click()
'FKV TOGGLE'
ActiveSheet.Unprotect "manisk"
If ToggleButton1 Then
[Code] ........
View 2 Replies
View Related
Oct 4, 2011
I have several buttons which, when clicked, pull up a range of data from another tab. Each button repopulates the appropriate cells with its specific data. I need to have an identification of which data set I'm currently viewing so was considering having the button, when clicked, change color or background/lettering colors swap, etc, until another button is clicked, then it changes color and the original button returns to the standard format. Is this possible? What type of button do I need to use?
View 1 Replies
View Related
Mar 30, 2009
I was wondering if it is possible to change the color of a command button after it's been clicked?
This is to allow the user to identify which buttons have already been clicked.
View 9 Replies
View Related
May 20, 2009
I am trying to do is if a user hovers the mouse over a commandbutton, the button will change color and the label will tell the user what that button does. This works almost perfectly except that if the user goes directly from one commandbutton to the one directly next to it, they the previous commandbutton does not change back to it's original color. It will only work if the use first move away from the first commandbutton and then hovers over the second.
Private Sub CommandButton20_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.CommandButton20.BackColor = RGB(149, 28, 2) 'orange
Me.Label1.Caption = "No changes can be made."
End Sub
Private Sub CommandButton18_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.CommandButton18.BackColor = RGB(149, 28, 2) 'orange.................
View 9 Replies
View Related
Jun 23, 2005
I am using the following code to create an Excel toolbar custom control Button. What would be the VBA code to change the color of the image I have chosen? ....
View 6 Replies
View Related
Jan 23, 2014
what code I can put behind a button so that once I click on that button,
What ever cell i click on, the whole row of that cell will be colored a certain color.
Is this where i would used a target approach?
View 6 Replies
View Related
Feb 15, 2010
I would like to be able to change the color of a cell in V4:AB31 and have the formula in AM10:AM13 automatically calculate the new result. As it is now the user has to press Ctrl ALT f9 for the formula to recalculate.
View 7 Replies
View Related
Apr 18, 2008
I have two columns. The first one (A) contains cells that have different Fill colors. The second column (B) contains text adjacent to the colored cells. I am trying to change the color of the text in the second column (B) to the corresponding color in the adjacent cell in the first column (A). I don't think conditional formating works well in this situation. I believe the solution would be some sort of macro.
View 3 Replies
View Related
Jul 9, 2009
I have font color white in blank cells in column E and I (from row 5 to row 245) so the visitors will not see the text. If any of these cells become yellow (color code is 6), the font color will become black so visitors can see the text alot far better than white. I've tried this code myself after this post but nothing happen
View 4 Replies
View Related
Oct 17, 2006
I have various row cells in column (F) filled with the color Green. And corresponding text in Column G. How can I change the text of that particular row to white.
i.e.: if any cell in column F is Green, change the text color of that row in Column G to white?
View 5 Replies
View Related
May 6, 2009
the following code clears contents in the Range given.
View 5 Replies
View Related
Jun 3, 2008
I have a drop down sub pasted to worksheet:
Private Sub ComboBox1_Change()
ComboBox1.List = Array(100, 200, 300, 400)
If Range("I11").Value < Range("N11").Value Then
If Sheets("Profile").Range("K18").Value < ComboBox1.Value Then
Range("I11").Interior.ColorIndex = 2
Else
Range("I11").Interior.ColorIndex = 3
End If
End If
End Sub
I want it to change the cell color on drop down change. How can I modify things to have the change in drop down selection?
View 9 Replies
View Related
Oct 5, 2012
I am creating a status board at work... Kinda like an In/out board.
I created a toggle button and using it as the persons named. I want them to be able to go to the excel sheet on our intranet. Be able to click their name (toggle button) and it change the off cell from red to white and the on cell from white to green. Then they can save the excel sheet and close out for the next person.
edit: I would also need it to go back once they click it when they leave.
I have created the active x button, but so far the only thing I can do is get the 1 cell it effects to say true/false.
View 9 Replies
View Related
Nov 24, 2009
What formula do i use if i want the text in cell A1 to change to red if any entry is made in cell B1.
View 2 Replies
View Related
Dec 14, 2009
I am having some color problems. From A2:AB2000 I have different fill colors for cells all over the place. The only color I need is the color purple which I believe is the color “39”.
So basically all cells except the cells with the color purple change to white from A2:AB2000. I would like to add this code to the macro I have already created.
View 2 Replies
View Related
Nov 22, 2012
I'm trying to put together a script which changes the color of the row in columns A:AE if any cell in the Range B7:B400 has the value of 'No'. If it has the value of 'Yes' I would like it to Exit Sub.
I've put together the code below to try an create this function, but I'm running into a few problems.
Code:
If Intersect(Target, Range("B7:B400")) Is Nothing Then Exit Sub
If Selection.Cells.Count > 1 Then Exit Sub
If Target "No" Then[code]....
When the value of any cell in Range B7:B400 is 'Yes' the row changes to grey, if I enter 'No' it removes all cell shading from the row, and I'm not very clear on what changes I need to make.
View 2 Replies
View Related
Apr 4, 2007
I've got some spread sheets that I send out. People fill them out and send them back to me. The only problem is that I dont know which cells they've changed and which cells they've left. Is thier a way to tell VB to change the color of a cell if the value has changed
View 9 Replies
View Related
Jul 24, 2007
I have to check a cell to see if ti has a date in it, if so , then i have to check the current date to another cell, if the current date is greater then that cell i want to change the color of the cell
View 9 Replies
View Related
Apr 28, 2008
When I click on a button I would like an option to cancel a row range of cells by turning the writing red with a cross through it.
So if I wanted to cancel a certain row of data I would click on a button, enter the range of cells to cancel and then this would turn all of the writing in the cells to red colour with a strike through the words.
View 9 Replies
View Related
Jan 7, 2010
i need to add this in a macro that i previously created
here is what i need, i hope its clear for everyone to understand
I want to be able to change a color of a row to purple if a cell is greater than 5 days
so basically what i need is something like this
IF BQ1 has the data "APPROVED" and data in BP1 is 01/04/10 and BN1 is blank and if BN1 is blank after 5 days of BP1 then the color of this row changes to purple
View 9 Replies
View Related
Mar 23, 2007
I want to change the row color after the value in one of the cells equals a certain value. What is the best/easiest way to accomplish this?
View 9 Replies
View Related
Jul 28, 2008
I was wondering if there is a way to enable a button when a cell is filled in. the button is disable by default.
View 9 Replies
View Related
Jul 20, 2009
I'm putting the sum of 3 cells in a 4th cell(D2). If the sum is greater, I would like the sum to be the color green. If the sum is less, I would like the sum to be the color red. Is this possible?
(D2) has change value, I want to compare the new value against the existing one.
View 9 Replies
View Related
Mar 10, 2014
I would like to change the default color of any excel sheet I use to grey from the standard white and I am struggling to find out how this is achieved.
In other words, I am trying to have all cells in the sheets I work with appear grey on my screen by default. A coworker of mine used to work in banking and she has grey cells but does not know how she changed them.
View 1 Replies
View Related
Aug 25, 2009
I'm trying to do. I have 2 columns, both have empty cells with borders. I would like to make it so that when the user clicks one of the cells, it turns grey and the one beside it turns white. I set up two macros as follows:
View 3 Replies
View Related
Dec 20, 2011
I'm trying to set up a spreadsheet to track 20 vehicles mileage, and when they are due for an oil change. I have the value of when they are next due in column D, and the actual mileage in column G. I want to have the row for each vehicle turn yellow when they are within 1,000 miles of needing an oil change, and red when they are due/overdue.
View 2 Replies
View Related