Defined variable problem

mikeymay

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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,877
Members
452,949
Latest member
Dupuhini

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