+ Reply to Thread
Results 1 to 2 of 2

Shape control

Hybrid View

  1. #1
    Registered User
    Join Date
    04-06-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    16

    Shape control

    I want to insert a line shape and have the color and weight of that line be controlled by a value of a cell

    for example of cell A1 is =1 then the line would be green and fat
    if i change the value of Cell A1 to =2 then the line would turn to black and shinny

    any way to do this?

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Shape control

    You might need VBA for that. Insert the code to Worksheet module and you might need to play around with the set or shape design.

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Range("A1") = 1 Then Shapes("Oval 1").ShapeStyle = msoShapeStylePreset14
    If Range("A1") = 2 Then Shapes("Oval 1").ShapeStyle = msoShapeStylePreset13
    End Sub
    Attached Files Attached Files

+ 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