Changes other sheets without jumping back and forth

Loin75

Active Member
Joined
Oct 21, 2009
Messages
281
I have set a rule that if a cell on sheet A gets changed, then rows on sheet B become hidden.

Is there a way to make this happen without having to select sheet B in the process - as the user ends up watching the macro jump to sheet B and back again.

I'd like it to happen discreetly / silently..

Many Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi there,

Can you post your macro below? It's probably a simple 1 liner to add (Application.Screenupdating = False).
 
Upvote 0
Never posted in tags before. Can you explain how please..

(sorry for ignorance)
 
Upvote 0
Hi

It would be easier if you had posted your existing code, but you don't need to Select a sheet to work with it - so in your Change event on the first sheet you can hide rows on the second without selecting it:

Code:
'for Sheet 1:
 
Private Sub Worksheet_Change(ByVal Target As Range)
 
If Target.Address = "$A$1" Then
  Sheets("Sheet2").Range("A3:A4").EntireRow.Hidden = True
End If
End Sub
 
Upvote 0
Utter genius... ---> (easily impressed)

Thanks Richard.

Would still like to know how to post code in tags. Is it this icon "wrap (quote)"??
 
Upvote 0
Yeah just wrap the code in tags like this [ code ] Your code here [ / code ]

Omit the spaces and the board will fit the code into the code box
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top