Run sub procedure -- "expression expected" ???

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Run sub procedure -- "expression expected" ???

    Hi again,

    I'm trying to run a sub from within another:

    Public Sub txtScan_TextChanged(ByVal sender As
    System.Object, ByVal e As System.EventArgs) Handles
    txtScan.TextChanged

    ProcessSN(ByVal sender As System.Object, ByVal e As
    System.EventArgs)

    End Sub

    ByVal is indicating "expression expected". What is the correct way to
    run a sub from another?

    Thanks.
    Kathy

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Kathy Burke Guest

  2. Similar Questions and Discussions

    1. #39588 [NEW]: unpack("a*", "abc\0") does not work as expected
      From: pprasse at actindo dot de Operating system: linux 2.6.10 PHP version: 4.4.4 PHP Bug Type: Scripting Engine problem Bug...
    2. "Acrobat PDF file format is having difficulties expected a non-negative integer"
      Posted this in a wrong folder before. Opening many of my AI 10 docs in AI CS is getting me this error message: "Acrobat PDF file format is having...
    3. "Expected a dict object" with Acrobat Prof 6.0 = lock up
      Trying to view a PDF from a website (www.skidmorednagenealogy.com)(PDF entitled "Family Genetics Project") Using Adobe Acrobat Professional 6.0...
    4. "wrong argument type nil (expected String)" from Dir.chdir
      I'm running Ruby 1.6.8. Can anybody tell me why this line: Dir.chdir("/") results in the error "wrong argument type nil (expected String)"...
    5. #26122 [NEW]: Logical Operator "and" not functioning as expected
      From: iam at nimajneb dot com Operating system: Mac OSX 10.2.6 PHP version: 4.3.2 PHP Bug Type: Math related Bug...
  3. #2

    Default Run sub procedure -- "expression expected" ???

    Hi Kathy!
    The ProcessSN procedure seems to be an event handler of
    some sort.
    I would guess that it would be the solution for you to
    move whatever code you have in that procedure to a
    separate procedure. Then call the new procedure from both
    the txtScan_TextChanged and ProcessN event handling
    procedure.
    Finally if you want to call another procedure you just
    use the procedurename and send in the necessary datatypes.
    Ex: "SomeProc(MyObject, strValue)" would be a correct way
    to call "private SomeProc(ByVal SomeObj As Object, ByVal
    SomeStr As String)"
    >-----Original Message-----
    >Hi again,
    >
    >I'm trying to run a sub from within another:
    >
    > Public Sub txtScan_TextChanged(ByVal sender As
    > System.Object, ByVal e As System.EventArgs) Handles
    > txtScan.TextChanged
    >
    > ProcessSN(ByVal sender As System.Object, ByVal e As
    > System.EventArgs)
    >
    > End Sub
    >
    >ByVal is indicating "expression expected". What is the
    correct way to
    >run a sub from another?
    >
    >Thanks.
    >Kathy
    >
    >*** Sent via Developersdex [url]http://www.developersdex.com[/url]
    ***
    >Don't just participate in USENET...get rewarded for it!
    >.
    >
    KD Guest

  4. #3

    Default Re: Run sub procedure -- "expression expected" ???

    Thanks KD...that made it clearer. I'll go play with it.

    thanks.

    KathyBurke

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Kathy Burke Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139