|
-
Apr 1st, 2010, 02:27 AM
#1
Thread Starter
Member
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
-
Apr 1st, 2010, 02:42 AM
#2
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?
-
Apr 1st, 2010, 03:49 AM
#3
Thread Starter
Member
Re: User-defined type not found Error
It is not a class... how to add the reference to the project..?
-
Apr 1st, 2010, 04:23 AM
#4
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.
..
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|