what's error causes compile error sub function not defined when call macro

Alaa mg

Active Member
Joined
May 29, 2021
Messages
375
Office Version
  1. 2019
Hi
I face problem wasn't show before !!
I try calling macro from sheet change event . it gives error compile error sub function not defined when try call test
how can I fix it,please?
 
You have two procedures named "N", one in the Sheet module and one in Module1. You should name these differently.

Once I corrected that, the code ran just fine.
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
thanks I delete all theses procedures , I don't need it , even if that still the error shows , is there any item from reference should be selected?
 
Upvote 0
What references do you have selected?
 
Upvote 0
here is the picture
1.PNG
 
Upvote 0
No, those all look correct to me.
I am not sure. When I removed the one "N" Procedure, it worked fine for me.
So I cannot even re-create the scenario using your file.

My only other suggestion would be to try recreating this on a brand new Excel file, in case the issue is due to some sort of file corruption.
 
Upvote 0
My only other suggestion would be to try recreating this on a brand new Excel file, in case the issue is due to some sort of file corruption.
Ok I will try it .
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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