Private Sub Worksheet_Change(ByVal Target As Range)

PanzerAttack

Board Regular
Joined
Jan 3, 2008
Messages
197
I've a sheet names Customer where I'm using this function

Private Sub Worksheet_Change(ByVal Target As Range)

So that when I change a cell a macro runs.

I've copied this sheet and renamed it business so I don't have to start from scratch but now it keeps jumping to the customer sheet when I make the change in the Business tab.

Does anyone know why?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You probably have the code in the wrong worksheet???

Press Alt F11. The code needs to be in the new worksheet code (double click on 'Business' in the Project Explorer window - and remove it from wherever it is now!
 
Upvote 0
You'll need to post the code. ;)

Most likely you have an explicit reference to the Customer sheet.
 
Upvote 0
Weirdly I've managed to fix it, I simply saved it to it's own sheet and then copied it back and it was okay.

Thanks for looking though
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,664
Members
449,045
Latest member
Marcus05

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