Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi NG,
Can anyone tell me what i am doing wrong in the below code? In the first version i was actively selecting the rectangle, and it was working. I changed it to a with - statement because it was pretty annoying that the rectangle constantly was selected. But now? thx in advance Thomas -------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim Number Number = Range("a1").Value Select Case Number Case 1 With ActiveSheet.Shapes("Rectangle 1").ShapeRange.Fill .Visible = msoTrue .Solid .ForeColor.SchemeColor = 44 .Transparency = 0.8 End With Case 2 With ActiveSheet.Shapes("Rectangle 1").ShapeRange.Fill .Visible = msoTrue .Solid .ForeColor.SchemeColor = 34 .Transparency = 0.5 End With Case 3 With ActiveSheet.Shapes("Rectangle 1").ShapeRange.Fill .Visible = msoTrue .Solid .ForeColor.SchemeColor = 24 .Transparency = 0.3 End With Case Else With ActiveSheet.Shapes("Rectangle 1").ShapeRange.Fill Visible = msoFalse End With End Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Case Statement | Excel Worksheet Functions | |||
select case statement | Excel Programming | |||
Select Case Statement does not evaluate | Excel Programming | |||
I dont understand.... | Excel Programming | |||
Convert If..Else to Select Case Statement. | Excel Programming |