Defined variable problem

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,507
Office Version
  1. 365
Platform
  1. Windows
I have a macro that execute with a Worksheet_Change event but before it starts I get a 'User-Defined type not defined' error, which when I click on 'OK' kicks off the code and executes with no issues.

I am struggling to flush this out and not entirely sure what to do.

After a bit of research I have established that I have the correct references checked so I don't think this will be the root of the problem.


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.

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,507
Office Version
  1. 365
Platform
  1. Windows
There is quite a lot of code so didn't think this was a sensible thing to do initially.

I have asked someone else to test the file and it was established that a line of code containing a declared variable has a character missing which was corrected.

This then allowed the user to run the code without the error being returned, yet I still got the error.

I have re booted and tried again but I am still gettin gth error.

If the code is still required I can post it all.


Thanks
 

Ruddles

Well-known Member
Joined
Aug 24, 2010
Messages
5,792
Office Version
  1. 365
Platform
  1. Windows
Let's see the DIMs and CONSTs first. And show us the line which was corrected.

If it's a huge amount of code I'm happy to take a look at it and the post my finding publicly. I'll PM you my address.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,292
Messages
5,836,448
Members
430,431
Latest member
Tomexcel2022

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
Top