Detect Sheet2 change event in Sheet1 Module through VBA

kartiki

New Member
Joined
Sep 4, 2015
Messages
11
I have two worksheets Sheet1 and Sheet2. I need to write function in Sheet1 module which would detect Sheet2 change event. I need this function in Sheet1 module cause Sheet1 would get duplicated with new revisions and want this code to get duplicated as well with it.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
There would have to be something in Sheet 1 to trigger the code first ??
 
Upvote 0
Lets say I need to detect A1 cell change on Sheet2 and add data validation to a range A1:A10 on Sheet1, based on Sheet2-A1 cell's content.
 
Upvote 0
That's fine but something will have to change in Sheet 1 to activate the code !!!
Have you considered putting the code in a module, then calling it from Sheet2 with a worksheet change event ??
 
Upvote 0
That's fine but something will have to change in Sheet 1 to activate the code !!!
Have you considered putting the code in a module, then calling it from Sheet2 with a worksheet change event ??

Sheet1 module needs to have a function called

Sub Sheet2_change(ByVal Target As Range) ...this gets triggered on any cell change in sheet2
if target.row = 1 and target.column = 1 and target.value <> "" then
Sheets("Sheet1").range(cells(1,1),cells(1,10)).value = target.value
end if
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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