+ Reply to Thread
Results 1 to 2 of 2

Cell contents to affect Autoshapes color

  1. #1
    Registered User
    Join Date
    04-08-2005
    Location
    Washington, DC
    Posts
    63

    Cell contents to affect Autoshapes color

    I have several lines (autoshape line) of the color blue
    and would like to change the color of the line to white (or Hide)
    if Cell A1="F"

    I just want to hide specific named lines, not all lines

    for instance
    I have 4 blue lines, 3 red lines and 2 green lines
    if Cell Sheet!A1 = F then hide blue lines, if Cell Sheet1!A1=A then hide green lines but show blue and red lines.

    and the sheet is not active, Cell A1 is Sheet1!A1
    Lines are on Sheet2

    Any Ideas????

  2. #2
    Registered User
    Join Date
    04-08-2005
    Location
    Washington, DC
    Posts
    63
    This Works but, Is there a better way to do this?
    It look clumbsy


    Private Sub Worksheet_Calculate()

    Dim shp1 As Shape
    Dim shp2 As Shape
    Dim shp3 As Shape
    Dim shp4 As Shape

    Select Case Range("A23").Value

    Case Is = "f"
    Set shp1 = Sheets("Diagram (HA)").Shapes("BlueLine_1")
    shp1.Line.Visible = msoFalse

    Set shp2 = Sheets("Diagram (HA)").Shapes("BlueLine_2")
    shp2.Line.Visible = msoFalse

    Set shp3 = Sheets("Diagram (HA)").Shapes("BlueLine_3")
    shp3.Line.Visible = msoFalse

    Set shp4 = Sheets("Diagram (HA)").Shapes("BlueLine_4")
    shp4.Line.Visible = msoFalse

    Case Else
    Set shp1 = Sheets("Diagram (HA)").Shapes("BlueLine_1")
    shp1.Line.Visible = msoTrue

    Set shp2 = Sheets("Diagram (HA)").Shapes("BlueLine_2")
    shp2.Line.Visible = msoTrue

    Set shp3 = Sheets("Diagram (HA)").Shapes("BlueLine_3")
    shp3.Line.Visible = msoTrue

    Set shp4 = Sheets("Diagram (HA)").Shapes("BlueLine_4")
    shp4.Line.Visible = msoTrue

    End Select

    End Sub
    Last edited by swieduwi; 04-25-2005 at 12:44 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1