English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have an integer in 1 of my form1 and i want to use it in my form2 how can i transfer the variable from 1 for to another?
Public rowTransfer As Integer
this is my variable in form 1 and when im trying to use it in form 2 im getting an error " rowTransfer is not declared"

2006-12-03 11:29:20 · 2 answers · asked by aryaxt 3 in Computers & Internet Programming & Design

2 answers

I am assuming that it is not WEBFORM

Make sure that Form1 instantiated before accessing the variable the form.

Other method is to define a separate class and put it as static variable. This class you can use for all the common utilities.

If it WEBFORM use the session variables.

2006-12-03 14:12:13 · answer #1 · answered by raju 5 · 0 0

Try prefacing rowTransfer with the name of the first form.

Form1.rowtransfer.


Your public declaration of rowtransfer made it accessible to other parts of the program, but it basically made it a property of the form.

2006-12-03 11:49:23 · answer #2 · answered by thespamdagger 2 · 0 0

fedest.com, questions and answers