Re: Issue on MS Visual Basic
|
Sindoori Loleeta |
|
11/19/2008 11:14:56 PM |
Hi Avlos, There are two ways first 1. u can do that via module file at declare part 2nd: u can do that on form declaration part using public keyword Post Comments |
|
Re: Issue on MS Visual Basic
|
Mr.Iestamyo Shakaaramutai |
|
11/19/2008 11:15:39 PM |
HI, Ya declare them publicly Post Comments |
|
Hey Iestamyo, Pls see the consequences. Post Comments |
|
Re: Issue on MS Visual Basic
|
Chalkku Monteintah |
|
11/19/2008 11:16:19 PM |
Hey Avlos, If you are talking about VB 6.0 then declare it Form level to access in all command...this will be private for that FORM. and to have Public variable declare it in any module as a GLOBAL variable....
And if you are talking about Vb.Net then again declare [DIM i as INTEGER] variable at class level to have access in all command in same class.
Now if you declare it as "Public I as Integer" then it will be public and can be accessed any where using object of the class
and u can also declare it in module...as a public variable, And also u can declare variable as "SHARED" variable to have common access any where in application
Post Comments |
|
Yeah, I agree with it! Post Comments |
|
Re: Issue on MS Visual Basic
|
Dhamayanthi Nadesan |
|
11/19/2008 11:17:58 PM |
Hi, You need to declare the variable in (General) - (Declarations) of the form. i.e. If you declare at General Declarations Dim i as integer 'i' can be used in Command01_click,Command02_click,...... Post Comments |
|