Results 1 to 5 of 5

Make shape visible/invisibale based on change of cell in different worksheet

Threaded View

  1. #1
    Registered User
    Join Date
    01-10-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Make shape visible/invisibale based on change of cell in different worksheet

    Hi.

    I'm attempting to code a worksheet change which allows for an autoshape to disappear based on cell results from a different sheet.

    I thought I had it but id doesn't re-run the macro when the cell is changed and therefore, the shape stays gone until an entry is made on the sheet,

    Here is what I'm trying to incorporate together.

    Thansk for the help.

    Private Sub Worksheet_Calculate()
    'Must disable events otherwise will run again
    'when A2 is saved to T2
    Application.EnableEvents = False
    
    If Range("U2") <> Range("V2") Then  'Value has changed
    Range("V2") = Range("U2")       'Resave new A2 value
    End If
    
    Application.EnableEvents = True
    
    Sub Worksheet_Change(ByVal Target As Range)
    
    If Range("$V$2") > 0 Then
    ActiveSheet.Shapes("Strikeout").Visible = True
    Else
    ActiveSheet.Shapes("Strikeout").Visible = False
    End If
    End Sub
    Last edited by DonkeyOte; 01-10-2011 at 04:37 PM. Reason: CODE tags please...

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