LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Select case statement - it will not work and i dont understand why! :o(

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
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
Select Case Statement Katie Excel Worksheet Functions 13 December 1st 08 07:32 PM
select case statement jrd269[_4_] Excel Programming 4 June 3rd 05 04:22 PM
Select Case Statement does not evaluate Jeff[_44_] Excel Programming 11 April 6th 05 09:32 PM
I dont understand.... TOM Excel Programming 4 July 8th 04 02:49 PM
Convert If..Else to Select Case Statement. Sheela Excel Programming 1 July 25th 03 09:28 AM


All times are GMT +1. The time now is 07:07 PM.

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

About Us

"It's about Microsoft Excel"