User-defined type not defined-VBForums
Results 1 to 6 of 6

Thread: User-defined type not defined

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    455

    User-defined type not defined

    Hello, I get an error in the following code when I compile the project.
    I know that it is a reference missing problem but no clue.
    Code:
    Private Function PrintEvent(ByVal objTrans As Transaction, ByVal sMessage As String, ByVal objMessageID As MessageID) As Integer
    I haven't found "missing...." under project==>reference.

    How to reslove this issue?

    Thanks.

  2. #2
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,940

    Re: User-defined type not defined

    Can you post a snapshot of your references screen? Also when you take a snapshot, ensure the missing reference is selected...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    ACER R7 (Win 8.1+Office 2013+VS2013) || Sony VPCCB-45FN with a Win10+Office 2010. || Mac Book Pro (10.6.8) with Office 2011

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    15,368

    Re: User-defined type not defined

    You are passing 2 objects, user-defined types, or something else to that function.
    What are Transaction and MessageID? Where are they defined, provide their definitions.
    Insomnia is just a byproduct of, "It can't be done"

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {GDI+ Classes/Samples} {Unicode Open/Save Dialog} {Icon Organizer/Extractor}
    {VB and DPI Tutorial} {XP/Vista Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    455

    Re: User-defined type not defined

    Okay, please see MessageID.
    Attached Files Attached Files

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    455

    Re: User-defined type not defined

    Compare the vbp file on the sourcesafe, only one line is different.
    Code:
    Reference=*\G{....}#e.1#0#..
    On my local machine.
    Code:
    Reference=*\G{....}#14.0#0#..

  6. #6
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,940

    Re: User-defined type not defined

    You missed LaVolpe's questions...

    Also Put

    vb Code:
    1. Option Explicit

    on top of your code and then run it... Now what is the error message that you get?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    ACER R7 (Win 8.1+Office 2013+VS2013) || Sony VPCCB-45FN with a Win10+Office 2010. || Mac Book Pro (10.6.8) with Office 2011

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.