-
Mar 31st, 2010, 01:46 AM
#1
Thread Starter
Member
Error: Compile error:user-defined type not defined
Hi..
Am getting error, Compile error:user-defined type not defined how to solve this.. The code like this
Option Explicit
Public gIntMode As Integer
Dim Report As New rptCumulativeSawBlade
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, fArrSValues........[Error]
End Sub
-
Mar 31st, 2010, 06:12 AM
#2
Re: Error: Compile error:user-defined type not defined
Welcome to VBForums
See the "Fixing common VB errors" link in my signature, it has a section on dealing with that error.
-
Mar 31st, 2010, 07:25 AM
#3
Re: Error: Compile error:user-defined type not defined
1) I'm surprised Si, thread shouldn't be in Database Developmnet, has nothing to do with databases.
2) Arunvb - what version of VB are you using?
-tg
-
Mar 31st, 2010, 07:30 AM
#4
Thread Starter
Member
Re: Error: Compile error:user-defined type not defined
-
Mar 31st, 2010, 07:36 AM
#5
Re: Error: Compile error:user-defined type not defined
Originally Posted by techgnome
1) I'm surprised Si, thread shouldn't be in Database Developmnet, has nothing to do with databases.
Me too... not sure how I missed that!
Thread moved from 'Database Development' forum to the 'VB6 and earlier' forum
-
Mar 31st, 2010, 08:30 AM
#6
Re: Error: Compile error:user-defined type not defined
@arunvb - on which line does the error occur? We're not mind readers, so it would help if you could point out which line is the problem.
Also, in the future, put [code][/code] or [highlight=vb][/highlight] tags around your code? It preserves the indenting, making the code a lot easier to read.
-tg
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
|