How to update range when active sheet is not active any more

szchris384

New Member
Joined
Oct 3, 2010
Messages
8
Hello, trying to update a range in another worksheet, but only when the active worksheet is not selected anymore.

Ie, 4 worksheets in my workbook, sheet1...sheet4.
When user changes something in sheet4, then selects sheet3, I would like vba code to update a range in sheet1. But this can only update the range in sheet1 when the user clicks onto any other sheet.

I have a button right now for them to click to go to sheet3, but if they don't click that button and click sheet3 directly, it won't update. That's why I require to update a range in sheet1 when they click off of sheet4.

Thanks for any help.
Chris
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
You can add an event handler in the worksheet code of sheet3 to run code when sheet3 is activated....in the Visual Basic Editor you can add macros to the worksheet objects by double clicking the worksheet name in the project window and then use the object/procedure dropdowns (screenshot is in this post) to select the event you want to use. Then insert your code within the Event Sub
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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