By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,990 Members | 2,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,990 IT Pros & Developers. It's quick & easy.

question about variables and subprocedure

P: n/a
Hi,

How have i to define variable 'a' in procedure 'Page_Load" in order to be
accessible in procedure "mysub()"?

Thanks
Britt
Partial class myclass
Protected Sub Page_Load(....)
dim a as table
.....
end sub
______________
sub mysub()
a=new Table
.....
end sub
end class


Nov 13 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You'll have to do it outside the Sub for it to be "visible" to mysub.
Declare it with private scope so only the procedure in myclass can
access it.

Partial class myclass

private a as table

Protected Sub Page_Load(....)
....
end sub

sub mysub()
a=new Table
....
end sub

Thanks,

Seth Rowe
Britt wrote:
Hi,

How have i to define variable 'a' in procedure 'Page_Load" in order to be
accessible in procedure "mysub()"?

Thanks
Britt
Partial class myclass
Protected Sub Page_Load(....)
dim a as table
....
end sub
______________
sub mysub()
a=new Table
....
end sub
end class
Nov 13 '06 #2

P: n/a
Thanks

"rowe_newsgroups" <ro********@yahoo.comschreef in bericht
news:11**********************@f16g2000cwb.googlegr oups.com...
You'll have to do it outside the Sub for it to be "visible" to mysub.
Declare it with private scope so only the procedure in myclass can
access it.

Partial class myclass

private a as table

Protected Sub Page_Load(....)
....
end sub

sub mysub()
a=new Table
....
end sub

Thanks,

Seth Rowe
Britt wrote:
>Hi,

How have i to define variable 'a' in procedure 'Page_Load" in order to be
accessible in procedure "mysub()"?

Thanks
Britt
Partial class myclass
Protected Sub Page_Load(....)
dim a as table
....
end sub
______________
sub mysub()
a=new Table
....
end sub
end class

Nov 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.