answersLogoWhite

0


Best Answer

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

βˆ™ 15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

βˆ™ 10y ago

It may sound contradictory, but a constant is a variable that cannot change. The program will prevent the value being changed during the course of the program. They are used for fixed values that can be referred to as a variable name, but will not be changed during the program. This can be better than hard coding the value into the program, in other words typing an actual value in.

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 13y ago

A variable in Visual Basic allows you to store information such as numbers, letters, dates or words.

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 14y ago

Variable or var mean a value eg:Integers Floats Double Boolean


RECE

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 9y ago

In Visual Basic, a variable is a memory location that stores a value when an application is executing. The names that programmers assign variables allow referencing.

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 12y ago

with :

End Sub

End Class

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 11y ago

Adds 2 to a and stores the result in b

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 10y ago

underscore

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write an assignment statement in visual basic?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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 do you write a arithmetic operations in c using compound assignment statement?

a = b = c


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


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.


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.


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.