Results 1 to 2 of 2

Thread: ? re global variable

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Location
    UK
    Posts
    93

    Resolved ? re global variable

    Hiya

    I need to declare an array called Data as a global variable within a module.

    I have added the module and written the vb code as
    Visual basic code
    ------------------------------------------------------------------------
    Option Explicit

    Public Data(0 to 3) as Global

    ------------------------------------------------------------------------

    When I select global I get a comile erroe advising Expected new or type name.

    I am doing this for a course I am doing, I need the array to use it within a pie chart creation using a circle and I do not have help functionality on my VB software.

    Can anyone tell me, what the global refers to and if what I am using is correct, or whether I should be using something different.

    Thanks

    Tracey
    Last edited by Tazmania; Apr 29th, 2006 at 08:36 AM. Reason: resolved

  2. #2
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: ? re global variable

    Declare it as:
    VB Code:
    1. 'To declare a string array
    2. Public Data(0 to 5) as String
    3. 'To declare a integer array
    4. Public Data(0 to 5) as Integer
    5.  
    6. 'Something like that ...
    CS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width