Defined variable problem

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,486
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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,486
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,786
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,119
Messages
5,640,218
Members
417,131
Latest member
Seanr19871

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