w7 - > VB6错误“用户定义的类型未定义”

时间:2016-10-30 15:48:33

标签: windows-7 vb6

在尝试编译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

1 个答案:

答案 0 :(得分:0)

您可能没有在项目中添加frmMain表单。请检查它是否可用。

enter image description here