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
If FormReports.ChkBoxDespPending.Value = True Then
Call DespPendingReprots
End If