Skip to Content
author's profile photo Former Member
Former Member

Creating a method with ByRef parameter

Hi All,

when i am creating a method with parameter as ByRef, i am getting the message as fallows.

Please use valid signature.

help me to overcome frojm this.

Thanks in advance.

With Regards

Raju

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2008 at 06:04 AM

    Hi Raju,

    Make sure you have necessary "Handles" clause present

    eg: Private Sub mCore_beforeUnload(ByRef cancel As Boolean) Handles mCore.beforeUnload (mcore here is the tile or tileset )

    Thanks

    Abishek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2008 at 06:38 AM

    Hi abishek,

    Thanks for your input.

    but i am not creating event handler, just i am creating a method.

    here is my method look like.

    Public Sub SetCopyDefaults( ByRef objSdgen As BusinessObject, ByRef strCopyTypeTmp As String)

    Thanks in advance.

    With Regards,

    Raju

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 07:13 AM

    Hi Wolfhard,

    Exactly.

    I want to create a custom method with ByRef parameters.

    Thanks in Advance.

    With Regards,

    Raju

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 07:22 AM

    Hi ,

    when i am creating the function with ByRef parameters it is creation.

    but when i am creating with key word sub with ByRef parameters it is not creating,

    it is saying pls provide currect signature,

    Thanks in advance,

    With Regards,

    Raju

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      strange... I even thought that ByRef is default parameter type for sub... maybe you can try this.

      Or try to create your sub directly in the project file, maybe then you will have a proper error message from MS.

      Regards,

      Wolfhard

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 09:42 AM

    Hi,

    By any chance the parameters passed are "property parameters"??. If they are i dont think VB.net will support them. Please check that.otehrwise i feel this shuld work.

    Thanks,

    Abishek

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.