Results 1 to 3 of 3

Running a Macros in Sheet2 from a targeted cell In shee1

Threaded View

Shootboydang Running a Macros in Sheet2... 08-09-2012, 04:22 PM
Cutter Re: Excel macros event change 08-09-2012, 06:18 PM
Shootboydang Re: Excel macros event change 08-10-2012, 09:04 AM
  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Running a Macros in Sheet2 from a targeted cell In shee1

    I'm trying to get a macros to run in sheet 2 when sheet1 is active and a value is reached in a cell in sheet 1. I can not get my VBA code to work:

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = Worksheets("Sheet1").Range("E18").Value Then
    If Target.Value = 0 Then MinMacros
    If Target.Value = "x" Then MaxMacros
    
    End If
    
    End Sub
    I have several Macros running in the first sheet that all work well. An example of one of the if then event changes would be:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Target.Address = "$H$61" Then
    If Target.Value = 0 Then minimizeControls
    If Target.Value = "x" Then maximizeControls
    
    End If
    The object of the macros is to minimize non important data when the cell is blank or = 0. and maximize important data when the cell is = to "x".

    Thanks for the help.
    Last edited by Shootboydang; 08-10-2012 at 09:14 AM. Reason: Changed title for clarity

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