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 bharathinec on

Ad

2 Answers

Anonymous

  • 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

Ad

Anonymous

  • 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

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

How can i solve integrals with ALGEBRA FX 2.0 PLUS


The syntax for the evaluation of definite integrals (integrals with boundary limits) is as shown on the screen capture below.

$ (function , variable , lower bound, upper bound)
By default the name of the dummy variable is x. If you use another name, the variable must appear as an argument of the function, and as variable.

3_14_2012_11_39_12_pm.png

Mar 13, 2012 | Casio Algebra FX 2.0 Calculator

1 Answer

When i am graphing and I enter- Y1=Sin(theta) it does not graph it and says syntax error


When drawing function graphs of type Y1=, the name of the independent variable should be X
For polar graphs r=.., the independent variable is theta, while for parametric graphs it is T
To enter the default independent variable, press the key marked [X,Theta, T] . It will type in the correct name.

Sep 18, 2011 | Casio FX-9750GPlus Calculator

1 Answer

Whenever the command expand, diff or integrate are use it comes up with wrong argument. I have tried to clear all variables and default the set up but to no avail.


I believe you are using the wrong syntax for the commands.
diff ( function, variable) Example: diff (sin(x^2), x) sgould give you 2.x.cos(x^2)
expand( will expand an expression that has parentheses: expand( (a+b)^2) will give a^2+2a.b+b^2
Integrate $
$ ( tan^-1(x), x) willl give x.tan^-1(x) -(1/2) ln ('x^2+1')

Check the syntax of a command before using it. You will find the list of all comands and their syntax in the reference manual.

Aug 22, 2011 | Casio ClassPad 300 Calculator

1 Answer

How to connect MS access in the visual basic?


This following code to connect vb 6 with access
place this code in module :
vb Syntax
  1. Global Conn As ADODB.Connection
  2. Global rs As ADODB.Recordset
  3. Sub Access_Connector()
  4. Set Conn = New ADODB.Connection
  5. Conn.Provider = "microsoft.jet.oledb.4.0"
  6. Conn.CursorLocation = adUseClient
  7. Conn.Open App.Path & "\SIS.mdb"
  8. End Sub
Below link might help you... http://www.functionx.com/vbaccess/Lesson01.htm

Please rate or vote me , if you like solution..

Thanks
sandeep

Mar 15, 2011 | Computers & Internet

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

How to use the arc length function


Hello,
The arcLen() function is in fact a definite integral: You need the function, the name of the variable, the starting value of the variable, and the final value of the variable.

The syntax is as follows:

arcLen(expression1, variable, begining value, end value)

arcLen( f(x), x, a, b)
arcLen (cos(x), x, 0, pi) calculates the arc length of the cosine function from x=0 to x=pi


Hope it helps

Mar 31, 2009 | Texas Instruments TI-89 Calculator

1 Answer

Program not working


Type mismatch is caused by trying to use a variable defeined as one type to store another type of data. For example a variable that is integer but you try to set it to a letter.
In VB.net this can be caused by a line like this:
textbox="hello"
when it should be
textbox.text="hello"
see if you have that sort of mistake.

Dec 12, 2008 | Microsoft Visual Basic 6.0 for PC

1 Answer

Visual basic basics


In a code module, use this form:

Global <variable> as <Type>

eg:

Global varVar as Variant
Global intVar as Integer

Take a look at this.

Public is now preferred over Global, but VBA will take both. Don't know about VB itself, try it and see.

Aug 18, 2008 | Computers & Internet

1 Answer

Boolean Logic


I don't know the syntax but you could easily do this with setting the switches to a constant, then adding them up. The number set would need to be something so that there would only be one solution...the one that you were looking for.

sw1 = 1
sw2 = 2
sw3 = 4

If sw1 and sw2 is both on, but sw3 is off, the number would be 3
If sw2 and sw4 was on, the number would be 6
If all were on, the number would be 7, etc.

May 08, 2008 | Computers & Internet

2 Answers

Visual Basic 6.0


1. IDE is Integrated Development Environment
2.With VB 6, one can develop applications with feature rich GUIs (Graphical User Interface). Many varieties of general purpose software can be created with little effort, including, but not limited to, image editing software, text editor and database applications.
3.Windows Application Template
-----------------------------------------------------
Used to create Windows-based applications that run locally on users' machines. You can build anything from a simple single-window tool like Windows Calculator to a complete application with multiple windows and advanced capabilities.

Class Library Template
-----------------------------------------
Used to create reusable classes or components that can be shared with other projects.

Console Application Template
----------------------------------------------------
Used to create command-line applications, programs that run from a Windows command prompt and have no visual interface.

My Movie Collection Starter Kit Template
-------------------------------------------------------------------------
Used to create the pre-built My Movie Collection sample application, which you can customize to meet your own needs. For more information, see Starter Kits: Getting Up and Running Quickly.

Screen Saver Starter Kit Template
-------------------------------------------------------------
Used to create the pre-built Screen Saver sample application, which you can customize to meet your own needs. For more information, see Starter Kits: Getting Up and Running Quickly.
4.FormShaper lets you change the shape that windows draws your forms. You can have rectangles, rounded rectangles, ellipses, polygons and any combination of the above! Even save the shapes to a file for use in other projects! See readme.txt in the zip file for more details

5.Description
Used at script level to force explicit declaration of all variables in that script.
Syntax
------------
Option Explicit
Remarks
----------------
If used, the Option Explicit statement must appear in a script before any procedures.
When you use the Option Explicit statement, you must explicitly declare all variables using the Dim, Private, Public, or ReDim statements. If you attempt to use an undeclared variable name, an error occurs.
--------------------------------------------------------------------------------

Use Option Explicit to avoid incorrectly typing the name of an existing variable or to avoid confusion in code where the scope of the variable is not clear.

Feb 20, 2008 | Computers & Internet

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

Related Topics:

373 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Ekse

Level 3 Expert

13434 Answers

Marvin
Marvin

Level 3 Expert

85239 Answers

Brad Brown

Level 3 Expert

18342 Answers

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

Answer questions

Manuals & User Guides

Loading...