User-defined type not found Error
Hi..
Am getting error as compile error: user-defined type not found. plz help me...
The code like this..
Code:
Option Explicit
Public gIntMode As Integer
Dim Report As New rptCumulativeSawBlade[Error]
Dim fArrSValues(0)
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdPrint_Click()
On Error GoTo ErrHandler
If Val(TxYear.Text) < 2000 Or CbMonth.ListIndex < 0 Then
MsgBox "Invalid Month/Year Entry"
Exit Sub
End If
fArrSValues(0) = Format(CbMonth.ListIndex + 1, "00") & "/" & TxYear
PrintCumulativeSawBlade
cmdPrint.Caption = "Refresh"
Exit Sub
ErrHandler:
Me.SetFocus
MsgBox "Error in printing enquiries: " & Err.Description
End Sub
Private Sub Form_Activate()
On Error Resume Next
SetMenus True
End Sub
Private Sub Form_Load()
On Error Resume Next
'Add to the count of child forms opened. The method is defined
CbMonth.ListIndex = (Month(Date) - 1)
TxYear.Text = Year(Date)
AddChildFormCount
'Initialize the mode to "default mode"
gIntMode = gcIntDefaultMode
'INITIALIZATION of form parameter count
cmdPrint_Click
End Sub
Private Sub Form_Unload(Cancel As Integer)
RemoveChildFormCount
End Sub
Private Sub PrintCumulativeSawBlade()
ShowReport Report, CRViewer1, fArrSValues
End Sub
Re: User-defined type not found Error
And what is that rptCumulativeSawBlade type? If it is a Class, did you include it in the Project? If it comes from a reference, did you add the reference to the Project?
Re: User-defined type not found Error
It is not a class... how to add the reference to the project..?
Re: User-defined type not found Error
For adding Reference: Project menu --> References --> Tick mark the item that you needed.
Also, for defining a object, this will be better:
Code:
Dim Report As rptCumulativeSawBlade
set Report = New rptCumulativeSawBlade
I believe that rptCumulativeSawBlade is a Class Module.
..:wave: