Sub CommandButton1_Click()
Select Case rng.Interior.ColorIndex
Case xlNone
newCol = 3
Case 3
newCol = 2
Case 2
newCol = 5
Case Else
newCol = xlNone
End Select
rng.Interior.ColorIndex = newCol
End Sub
this is what I have... where do I select the cells (b1:c1)...
I am trying to get the cells to to change colour based on the colour that they are now. For example, if they are blank change to pink, if they are pink goto grey if they are grey goto blank.
I am trying to create a button in excel that allows for an if elseif else statement. ie:if cell(b2:c2) ColorIndex=xlNone then ColorIndex=15 etc.
basically I have three different colors per sheet and 10 sheets. Sheet one has pink grey and none. I have been fighting with this for a while now, I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.