Question about Computers & Internet

2 Answers

Global declaration syntax in vb

If we want to initialize a variable globally,then wat is the syntax in vb?

Posted by on

2 Answers

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Champion:

    An expert who has answered 200 questions.

    Governor:

    An expert whose answer got voted for 20 times.

  • Expert
  • 214 Answers

Hi,
for initializing a variable globally, add a module to the project and open the code window for the module.
Add the variable in the following syntax
public <variable name> as <type>
example
public a1 as integer


thank you

Posted on Aug 19, 2008

  • Level 1:

    An expert who has achieved level 1.

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Mentor:

    An expert who has written 3 tips or uploaded 2 video tips.

  • Contributor
  • 51 Answers

See my answer here.

Posted on Aug 19, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Why do we need to declare variables?


Hi,
I'm assuming you are referring to declaring variables in Procedural programming languages such as Java. Variables need to be declared for several different reasons, some of which include helping the computer reserve space in memory for variables to be stored and it also plays a part in the various stages of converting the source code, i.e. the code that you type in VB or Java, into machine code which is a series of binary digits that the computer can actually understand. It helps the computer in debugging the code for errors. In the first stage of code conversion, lexical analysis, information about the variable names is stored. In the next stage, Syntax analysis, the code is checked to be grammatically correct according to the rules of Backus Naur Form, i.e. if a key word such as PRINT is typed in as PLINT the computer will treat this as a variable name and since no information about this variable name has been entered in the lexical analysis stage it knows that an error has been made.
Hope this helps!

Dec 11, 2010 | Computers & Internet

1 Answer

A reference variable must be initialized at the time of declaration. when we call a function by reference then why we do not need to initialize reference variable. for example- void f(int &a) { ...


You have posted in the wrong section.
This is for computer help / operating systems.
If you post in the right section, you may get some help.
Good luck

Oct 27, 2010 | Computers & Internet

1 Answer

Configuring Symantec Scan Engine5.1 on Server2003 to scan solaris


Symptom: SSE install script does not detect the presence of non-global zones on Solaris 10.
Solution: New build (v5.19) supports both global and non-global zone installation.

Jun 22, 2009 | Microsoft Windows Server 2003 Enterprise...

2 Answers

Printing syntax


'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL

'define the connection string, specify database driver
ConnString="DRIVER={SQL Server};SERVER=yourServername;UID=yourUsername;" & _
"PWD=yourPassword;DATABASE=yourDatabasename"

'declare the SQL statement that will query the database
SQL = "SELECT * FROM TABLE_NAME"

'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")

'Open the connection to the database

Connection.Open ConnString

'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection

'first of all determine whether there are any records
If Recordset.EOF Then
Response.Write("No records returned.")
Else
'if there are records then loop through the fields
Do While NOT Recordset.Eof
Response.write Recordset("FIRST_FIELD_NAME")
Response.write Recordset("SECOND_FIELD_NAME")
Response.write Recordset("THIRD_FIELD_NAME")
Response.write "<br>"
Recordset.MoveNext
Loop
End If


'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing

May 16, 2009 | Microsoft Windows Vista Ultimate Edition

2 Answers

Please send me the code to link two forms of a project file...actually i wanted to to transfer a variable value from one form to another...please forward code as soon as possible


if this is vb 6 then you should be able to access the other variable by using the other forms name so if you are in form1 and want to access a variable in form2

form2.variable_name

and visa versa

If this is another language then it may differ

Apr 30, 2009 | Computers & Internet

1 Answer

C++


See progrming isn`t difficult b it in C or C++ or java.... Al u need to knw is first d syntax of d language u r using(for example Syntax of printing a line...), den acquire d knowledge f d standrd compilrs 4 d language(Eg gcc 4 ansi C n turbo c for C)... On my part i wud say start up wid C den procid to java n C++ n VB n stuffs....dere r many buks 4 basics in C available...

Mar 23, 2009 | Computers & Internet

1 Answer

Global ctalog


hi,

first is how didu know that global catalogue is not working?

infrastructure master and global catalogue should not be in same server.

if global catalogue server will not work then user information will not update.


ramana

Jun 22, 2008 | Microsoft Windows Server Standard 2003 for...

1 Answer

What is global catlog & how it works


The first domain contoller in a network is a global catlog server
global catlog do the replication in the forest and it require to create any object in the forest if global catlog is not availiable we cannot create any object

May 30, 2008 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

351 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

98921 Answers

David Payne
David Payne

Level 3 Expert

14089 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...