Worksheet Event Doesn't Work Excel 2007 VBA

Posted on 2012-08-10
Last Modified: 2012-08-10
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("D5")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
ActiveSheet.Shapes("redflagpic").Visible = False

End Sub

Open in new window

Why doesn't this hide the picture?
Question by:Dreamboat
    LVL 24

    Accepted Solution

    that exact code works for me, so am guessing it may be the name of the object is not correct or not typing into D5, cannot be certain what is the issue. though the code posted is fine.
    LVL 22

    Author Closing Comment

    Good enough. I closed all my files, deleted temps, and restarted Excel. Worked. Hm.
    LVL 24

    Expert Comment

    If in doubt always go for IT fix #1
    turn it off/turn it on again

    LVL 92

    Expert Comment

    by:Patrick Matthews

    Sorry, but I have to ask: are you sure macros are enabled?



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
    This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
    Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now