answersLogoWhite

0

You declare it by this:

Dim var as integer

or

Public var as integer

You can use other types instead of integer like long, double, string, byte etc.

Using Public is for making a variable accessible from everywhere and using Dim is for making it accessible only from where you declared it from.

For using the variable you just type:

var = 1

var = "something"

var = 5 + 10 * (2 - 3)

var = var & "abc"

var &= "abc"

In each case the variable will have these values:

1

something

-15

Whatever var had before plus abc

Again whatever var had before plus abc

These are the basics of using a variable

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you write a arithmetic operations in c using compound assignment statement?

a = b = c


What is Visual Basic Editor?

There have been many versions of Visual Basic. It is a program which allows you to write other computer programs. Each version of Visual Basic has come with an editor to allow you to write and edit code. This is called the "IDE", or "Integrated Development Environment".


How to write to computer memory?

Any assignment statement writes to memory. For example: F := A + 25 * X;


What are the uses of visual basic?

mostly to create programs and write "BASIC" code. somewhat different from the original version


How do you write a program in visual foxpro?

Same with other Visual Basic program, programming in FoxPro will require you to have the right syntax.


What development tool that helps programmers write compile and test their programs?

Microsoft Visual Studio comes with Visual Basic,Visual C++ etc.You can use them to create programs.


What statements can you write about 79 equals 63?

A false statement. or A statement not consistent with arithmetic. or A statement written by someone with no idea about basic mathematics. How's that for starters?


How would you write Visual Basic Code to declare an Integer variable called intNumber?

Dim intNumber As Integer


How can I write an assignment for an A+ grade?

Ways to write an outstanding assignment for an A+ grade? Choose an assignment topic Structure your ideas Craft a custom thesis statement The body paragraphs Adjust your writing to the requested type of assignment Peer review may be useful Revise until you’re fully satisfied If you are looking for SPSS help then you should search for Silverlakeconsult, SPSS-tutor and more for scoring A+ grade.


What does the statement and ldquo BIG BROTHER IS WATCHING YOU and support this statement about Winston and world?

You need to answer this prompt and write the essay assignment. Your teacher is looking for your critical thinking skills and how well you understood the lesson not ours.


Is Visual Basic included with Visual Studio?

Visual studio is a collection of different language compiler, whereas visual basic is just a single language. Visual studio express edition can be downloaded from www.microsoft.com/express A visual basic programmer uses visual studio to write and compile visual basic programs.


Write a note on indeterminate loop in visual basic?

Indeterminate loops in Visual Basic are loops that repeat for an unknown number of times. The programmer sets up the loop to repeat until a certain condition is reached, or while a certain condition is true.