CCompile error - user-defined type not defined - in Excel

SkumarSS

Temporary ban
Joined
Nov 25, 2020
Messages
3
Office Version
  1. 2013
Platform
  1. Windows
I am new to VBA macro. Written macro code in a module. Added a form with a few checkbox and based on selection value, to run the respective report. In the form I have a command button and on its click event I am calling the sub procedure (procedure which I have written in module). The code is functioning fine. When called through the command button, it is giving the following error -Getting Error - Compile error - user-defined type not defined. The code is given below. Please guide me. Thanks in advance.

If FormReports.ChkBoxDespPending.Value = True Then
Call DespPendingReprots
End If
 

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.
What line is highlighted by the compiler? You shouldn't get that error on any of those lines as they aren't declaring types of objects.
 
Upvote 0
Solution
What line is highlighted by the compiler? You shouldn't get that error on any of those lines as they aren't declaring types of objects.
Got it. Thanks for your suggestion. It was a wrong typo in a function heading. corrected and running smoothly, thanks a lot ji.
 
Upvote 0

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

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