w7 -> VB6 error “User-defined type not defined”

拥有回忆 提交于 2019-12-12 03:05:38

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!