954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to declare a global variable in a button click event

I'm wondering whether it is possible to declare a global variable in a click event. I need to declare an array of a specific size. The specific size is generated using a series of IF statements. I only need to know how to declare it.

Thanks in advance

I'm using 3.5 Framework Visual Studio 2008.

Hisham-Usif
Newbie Poster
5 posts since Aug 2010
Reputation Points: 10
Solved Threads: 1
 

I'm wondering whether it is possible to declare a global variable in a click event. I need to declare an array of a specific size. The specific size is generated using a series of IF statements. I only need to know how to declare it.

Thanks in advance

I'm using 3.5 Framework Visual Studio 2008.

Hi,

If you want to code in VB 2008 like it was meant to be used, check out OOP (object-oriented programming). You can achieve "global" variables without using a global variable with OOP.

Here is some information on OOP: http://www.developerfusion.com/article/1047/new-objectoriented-capabilities-in-vbnet/2/

Luc001
Posting Whiz
376 posts since Mar 2010
Reputation Points: 85
Solved Threads: 98
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: