473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #1
2 4617
KD
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 torun a sub from another?

Thanks.
Kathy

*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
.

Nov 17 '05 #2
Thanks KD...that made it clearer. I'll go play with it.

thanks.

KathyBurke

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michelle | last post by:
Hello all, I recently inherited a SQL 7.0 Server db accessed by a 2000 Access interface. When I try to open "Shipping Check Out" I am greeted with the following: The expression On Load you...
3
by: Jon | last post by:
I'm learning about datatables. When using the example provided by MS in the ..NET Framework Class Library for DATATABLE (see below) I get an error on line 3 that says "Type expected". Is something...
1
by: Vishnu Kumar Tiwari | last post by:
I am using below expression in xsd... I am getting devide by zero error. For ur information I am filling the dataset with the results obtained from Stored procedure. Now again I need to...
13
by: hn.ft.pris | last post by:
Hi: I have the following simple program: #include<iostream> using namespace std; int main(int argc, char* argv){ const double L = 1.234; const int T = static_cast<const int>(L); int arr;
4
by: =?Utf-8?B?SmFu?= | last post by:
In my application the user can configure automation-scripts by inserting different "actions" into a "procedure". These different procedure- and action-objects are all translated into C# code before...
9
by: Rohit | last post by:
I am trying to initialize an array whose initializers depend on value of Enums. I take enum and then decide the initializer value, so that even if enum value changes because of addition to list...
56
by: Adem | last post by:
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15) says under...
9
by: erictheone | last post by:
Ok so what I'm trying to do is create a trans location cipher. For those among us that don't know alot about cryptography it is a method for jumbling up letters to disguise linguistic...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.