How to declare global variables ? 
Author Message
 How to declare global variables ?

Hello,

I've a small question about VB 3.00. I cannot declare global variables:
It tell me the varible isn't declared when compiling.

Thank in advance,  

--
+--------------------------------------------------------+

|Av. des Colleges 52    | Fidonet: 2:301/315.12          |
|CH-1009 PULLY          |                                |
|                       |                                |
+--------------------------------------------------------+



Fri, 18 Jul 1997 15:40:57 GMT  
 How to declare global variables ?

Use a VB module, and in the Declaration section
use the global statements as follows
Global MyVar as Integer
Hope this helps
: Hello,

: I've a small question about VB 3.00. I cannot declare global variables:
: It tell me the varible isn't declared when compiling.

: Thank in advance,  

: --
: +--------------------------------------------------------+

: |Av. des Colleges 52    | Fidonet: 2:301/315.12          |
: |CH-1009 PULLY          |                                |
: |                       |                                |
: +--------------------------------------------------------+

--
Jose R. Nebro

       /////  ///////  //      //
        /    //   //  //\     //
       /    //////   // \    //
      /    // \     //   \  //
  ////    //   \   //     \//



Fri, 18 Jul 1997 22:37:46 GMT  
 How to declare global variables ?

Quote:


>Subject: How to declare global variables ?
>Date: 30 Jan 1995 07:40:57 GMT
>Hello,
>I've a small question about VB 3.00. I cannot declare global variables:
>It tell me the varible isn't declared when compiling.
>Thank in advance,  

use OPTION EXPLICIT to find that you have misspelled it.

------------------------------------------------------------------------
Chuck Stuart
Mesquite TX USA
Contract Programmer.
Author of VBTrace, runtime VB Trace/Profile/XRef utility.
------------------------------------------------------------------------



Fri, 18 Jul 1997 19:12:09 GMT  
 How to declare global variables ?

Quote:

>Hello,

>I've a small question about VB 3.00. I cannot declare global variables:
>It tell me the varible isn't declared when compiling.

>Thank in advance,  

>--
>+--------------------------------------------------------+

>|Av. des Colleges 52    | Fidonet: 2:301/315.12          |
>|CH-1009 PULLY          |                                |
>|                       |                                |
>+--------------------------------------------------------+

A global variable must be declared in the Declarations section of a
module (not a form).  It must use the GLOBAL keyword instead of DIM.
However, it can be in any global module.

Jeff



Sat, 19 Jul 1997 11:53:27 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to declare global variables ?

2. How do i declare global variables

3. How do i declare global variables

4. How do I declare a static global variable ?

5. declare global variables

6. How do you declare a global variable in the constants module

7. declaring global variables

8. declaring global variables/constants?

9. Declaring Global Variables

10. help: how and where to declare a global variable

11. Cannot assign a variable declared as a string to a variable declared as data type

12. Global Variables / Global Objects

 

 
Powered by phpBB® Forum Software