[RESOLVED] User-defined type not defined-VBForums
Results 1 to 6 of 6

Thread: [RESOLVED] User-defined type not defined

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    31

    Resolved [RESOLVED] User-defined type not defined

    Hi! I'm getting this message when running my application. This is strange as if I go to the references, my type is checked. I found now that, if I uncheck it, click OK, then open references and check it again, then click OK... the project runs as expected. I mean, it is only a matter of unchecking and checking it every time I restart VB6. Or, I can even solve by selecting again the reference, but again after I restart VB6, the error pops again. Is this normal? What can I do to solve?
    Thanks!

  2. #2
    VBaholic & Loving It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    GetWindowRect()
    Posts
    12,429

    Re: User-defined type not defined

    Welcome to the forums.

    Out of curiosity, what is the UDT? Do you also have it declared in your project?

    Maybe VB is confused to which one to use. Maybe you can resolve this by declaring the type specifically with the class?
    Example: Dim myRect As SomeReference.RECT
    Last edited by LaVolpe; Sep 23rd, 2009 at 09:40 PM. Reason: added welcome msg
    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}
    {VBA Control Arrays} {XP/Vista Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    31

    Re: User-defined type not defined

    Now it's working! Thank you very much!

  4. #4
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: User-defined type not defined

    What did you do?
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    31

    Re: User-defined type not defined

    I specified the class.

  6. #6
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    32,872

    Re: User-defined type not defined

    Now please help us out by marking the thread as resolved. If you have JavaScript enabled you can do that easily by pulling down the Thread Tools menu and selecting the Mark Thread Resolved item.

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.