+ Reply to Thread
Results 1 to 3 of 3

Macro sheet by sheet error

  1. #1
    Daniel R. Young
    Guest

    Macro sheet by sheet error

    I have a macro where when a cell on sheet 1 is selected to "NO" certin rows
    on the next sheet (2) will hide.

    When I go to sheet 2 and enter text in cell 'A1' the sheet go through all
    the macro's on that page (there are cells that will hide some rows on sheet 2
    when some cell are selected as "NO") and the rows that were once hidden now
    appear.

    Why would this happen?

    Thank you,

    Dan

  2. #2
    Jim Thomlinson
    Guest

    RE: Macro sheet by sheet error

    Without seeing any code it is impossible to say... I assume that you are
    using on change event procedures. Are the event procedures in the sheet or in
    thisworkbook?
    --
    HTH...

    Jim Thomlinson


    "Daniel R. Young" wrote:

    > I have a macro where when a cell on sheet 1 is selected to "NO" certin rows
    > on the next sheet (2) will hide.
    >
    > When I go to sheet 2 and enter text in cell 'A1' the sheet go through all
    > the macro's on that page (there are cells that will hide some rows on sheet 2
    > when some cell are selected as "NO") and the rows that were once hidden now
    > appear.
    >
    > Why would this happen?
    >
    > Thank you,
    >
    > Dan


  3. #3
    Daniel R. Young
    Guest

    RE: Macro sheet by sheet error

    Here is a small section of each since the code is really large:
    Sheet 1:
    Private Sub Worksheet_Change(ByVal Target As Range)
    Worksheets("Interview").Unprotect
    Worksheets("Interview").Rows("9:26").Hidden = UCase(Me.Range("B5").Value)
    = "NO"
    Worksheets("Interview").Rows("27:50").Hidden =
    UCase(Me.Range("B7").Value) = "NO"
    Worksheets("Interview").Rows("53:62").Hidden =
    UCase(Me.Range("B9").Value) = "NO"


    Sheet 2:
    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False

    Worksheets("Notes").Unprotect
    Worksheets("Notes").Rows("2:13").Hidden = UCase(Me.Range("A29").Value) =
    "NO"
    Worksheets("Notes").Rows("24:28").Hidden = UCase(Me.Range("A83").Value)
    = "NO"
    Worksheets("Notes").Rows("38:39").Hidden = UCase(Me.Range("A257").Value)
    = "NO"
    Worksheets("Notes").Rows("77:78").Hidden = UCase(Me.Range("A279").Value)
    = "NO"
    Worksheets("Notes").Rows("48").Hidden = UCase(Me.Range("A289").Value) =
    "NO"
    Worksheets("Notes").Rows("79:80").Hidden = UCase(Me.Range("A319").Value)
    = "NO"
    Worksheets("Notes").Rows("49:52").Hidden = UCase(Me.Range("A137").Value)
    = "NO"
    Worksheets("Notes").Rows("70:71").Hidden = UCase(Me.Range("A379").Value)
    = "NO"
    Worksheets("Notes").Rows("90:93").Hidden = UCase(Me.Range("A629").Value)
    = "NO"
    Worksheets("Notes").Protect


    "Jim Thomlinson" wrote:

    > Without seeing any code it is impossible to say... I assume that you are
    > using on change event procedures. Are the event procedures in the sheet or in
    > thisworkbook?
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "Daniel R. Young" wrote:
    >
    > > I have a macro where when a cell on sheet 1 is selected to "NO" certin rows
    > > on the next sheet (2) will hide.
    > >
    > > When I go to sheet 2 and enter text in cell 'A1' the sheet go through all
    > > the macro's on that page (there are cells that will hide some rows on sheet 2
    > > when some cell are selected as "NO") and the rows that were once hidden now
    > > appear.
    > >
    > > Why would this happen?
    > >
    > > Thank you,
    > >
    > > Dan


+ 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