问题
I receive error "User-defined type not defined" when trying to compile a VB6 programme.The statement "Public fMainForm As frmMain" is highlighted by the compiler. This programme has previously compiled without error.
My code is
Public fMainForm As frmMain
Public commonSQl, commonDSN, commonPealNo, commonDove, _
commonGridRefE, commonGridRefN As String
Public commonDate As Date
Public commonShowUnringable As Boolean
Public IsOpen As Integer
Sub Main()
Dim fLogin As New frmLogin
commonDSN = ""
fLogin.Show vbModal
Isloaded = -1
If Not fLogin.OK Then
'Login Failed so exit app
End
End If
Unload fLogin
frmSplash.Show
frmSplash.Refresh
Set fMainForm = New frmMain
Load fMainForm
Unload frmSplash
fMainForm.Show
End Sub
回答1:
You probably don't have frmMain form added to your project. Please check that it is available.
来源:https://stackoverflow.com/questions/40330806/w7-vb6-error-user-defined-type-not-defined