Results 1 to 5 of 5

Macro Auto run

Threaded View

  1. #1
    Registered User
    Join Date
    02-20-2011
    Location
    Dublin
    MS-Off Ver
    Excel 2007
    Posts
    88

    Macro Auto run

    Hi Guys,

    New to Macros and VBA but ...

    I have a simple Macro to hide rows if a cell value is NO called "Sheet1.ZeroTest"

    this works but i have to run macro manually each time

    So i have looked around and see i need a Worksheet change function to call this automatically if the cell contents change to 'YES'

    I have something like this

    Private Sub Worksheet_Change(ByVal Target As Range)
     If Intersect(Target, Me.Range("C12")) Is Nothing Then Sheet1.ZeroTest
    End Sub
    But my problem is i dont know where to put this in order for it to work...

    I have the Macro in Sheet1, how do i add the auto run to sheet1 too

    thanks
    Saz
    Last edited by Sazza; 11-25-2011 at 08:28 AM. Reason: add code tags for newbie

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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