CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Question for passing object as function parameter

    Help me!
    I wonder how can I passing an object as function/sub parameter
    since the procedure call always think my object as its default property/method

    example:

    Dim objectRef as MyObject
    set objectRef = new MyObject
    showObjectInfo(objectRef) 'Here it thinks objectRef as its default property

    sub showObjectInfo(oR as MyObject)
    oR.x = 1
    oR.y = 2
    end sub

    help me and send me mail([email protected])
    thanx a lot




  2. #2
    Join Date
    Dec 1999
    Location
    Dallas, Texas, USA
    Posts
    59

    Re: Question for passing object as function parameter

    Pass it in as Variant not MyObject.. It will work then.


    --
    Chizl
    [email protected]
    http://www.chizl.com/

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

Featured