在尝试编译VB6程序时,我收到错误“用户定义的类型未定义”。编译器突出显示“Public fMainForm As frmMain”。此程序以前编译时没有错误。
我的代码是
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