Results 1 to 7 of 7

Thread: Error in VB

  1. #1
    Join Date
    Oct 2008
    Posts
    31

    Error in VB

    When I try to run the program gives me this error: Can not set the public user-defined type within a private object module. How to handle this?

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: Error in VB

    Do you think this message only with someone you know clarify?

    The only thing I know is: have any one thing that is entered in the wrong place. If you want to know anything else, shows the portion of code that caused this problem and how is your project organized (which modules, classes, forms, etc.).

  3. #3
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Error in VB

    It seems to me that you have a variable in a class PUBLIC PRIVATE. There all the statements in your class to discover deficiency and properly implement.

    If you want to resolve this fast, at the risk of

  4. #4
    Join Date
    Oct 2008
    Posts
    31

    Re: Error in VB

    Here is the code I am suing,
    Code:
    name As String * 20 
    The age Integer 
    End Type 
    The dim () The Person 
    Dim i As Integer INDX

  5. #5
    Join Date
    May 2008
    Posts
    2,012

    Re: Error in VB

    This is where? In a class? In a module? In one form?

  6. #6
    Join Date
    Oct 2008
    Posts
    31

    Re: Error in VB

    Quote Originally Posted by Katty View Post
    This is where? In a class? In a module? In one form?
    In a form. Just a form to use this program.

  7. #7
    Join Date
    May 2008
    Posts
    2,012

    Re: Error in VB

    Here is the solution. Type Private Exchange by Type (Type Private Person) and Dim for Private (Private I, INDEX As Integer).
    By the way, this last line, you have
    Code:
    Dim i As Integer INDX
    You know that you do not declare the variable i as the integer type, right? Only the INDX. You have to change that to
    Code:
    Private i As Integer, INDX As Integer
    This is what is right.

Similar Threads

  1. Replies: 5
    Last Post: 04-05-2011, 10:50 AM
  2. Replies: 6
    Last Post: 12-11-2010, 11:37 PM
  3. Server Error: 451, Socket Error: 10053, Error Number: 0x800CCC0F
    By Eigenberg in forum Windows XP Support
    Replies: 3
    Last Post: 03-06-2008, 04:13 PM
  4. Replies: 3
    Last Post: 21-07-2005, 01:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,638,605.46536 seconds with 17 queries