w7 ->VB6 错误“未定义用户定义的类型"
问题描述:
我在尝试编译 VB6 程序时收到错误未定义用户定义的类型".编译器突出显示了语句Public fMainForm As frmMain".这个程序以前编译没有错误.
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.
我的代码是
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
答
您可能没有将 frmMain 表单添加到您的项目中.请检查它是否可用.
You probably don't have frmMain form added to your project. Please check that it is available.