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

I need a list of variables because I can't seem to find the right one when I use the "Dim" action. I usually get a warning that says "Unused local variable..'Then the variable name that I tried"

2006-09-19 12:23:13 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

if you are using Dim then the variable is local. That variable must be used within the function from which the variable is delcared.
Variables that you are likely talking about are not listed becasue you define them.
Ie

Private sub DoSomething
Dim x as int32 (int32 for vb.net)
X= 5
End sub

Private sub ThisWontWork
X=5 ' the variable here is not delacred within the function/sub
End sub

2006-09-19 12:27:26 · answer #1 · answered by ebred 3 · 0 0

Put this at the top of your program:

Option Explicit

That'll catch your typos.

2006-09-19 12:25:40 · answer #2 · answered by jacinablackbox 4 · 0 0

http://answers.yahoo.com/search/search_result;_ylt=Aob3dETV116S3ER4EfLgNTEezKIX?p=list+of+VB+variables

2006-09-19 12:26:01 · answer #3 · answered by helpdesk916 ♦♣♠♥ 6 · 0 0

fedest.com, questions and answers