Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Error When Connecting to Hidden Sheet Wuddus Excel Discussion (Misc queries) 5 August 3rd 06 03:34 PM
Macro Error when Sheet is Protected Johnny Excel Discussion (Misc queries) 4 July 28th 06 07:43 PM
macro on protected sheet-error michaelberrier Excel Discussion (Misc queries) 6 June 11th 06 06:31 PM
Excel macro - Range & Sheet name error sjohns34 Excel Programming 1 June 16th 04 07:10 PM
Sheet protection error msg - Unrequested sheet activation deltree[_3_] Excel Programming 0 January 28th 04 06:20 PM


All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"