Results 1 to 2 of 2

Thread: class property, multiple variables

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    1

    class property, multiple variables

    Hi,
    I am taking a vb class that is using vb6 for instruction, using vb.net for coding.

    I am very confused about setting properties in classes. My assignment uses a test file that accesses the property RPlace as follows:

    Call b1.RPlace(a, b, c)

    When I started coding the property, I got very confused on how to either get or set 3 variables, because all of the examples I read in the (numerous) books I've purchased use a single variable.

    The tooltip message I get in the module code is:
    "Property Access must assign to the property or use its value". I do not understand what this message means (I have some itelligence, but it seems to have failed me here).

    What type of information do I need to provide to get someone to help me understand how the properties I define in a class interact with the code in my module, and how I can use three variables with my class property?

    Crossing my fingers!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Call b1.RPlace(a, b, c)

    That isn't using a property, it is using a Sub Procedure.

    VB Code:
    1. Public Sub RPlace(ByVal a as string,ByVal b as string,ByVal c as string)
    2.  
    3. 'code here
    4.  
    5. End Sub

    Try researching subs and functions instead.

Posting Permissions

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



Click Here to Expand Forum to Full Width