Results 1 to 4 of 4

Thread: [RESOLVED] declare a variable as global?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2004
    Posts
    121

    Resolved [RESOLVED] declare a variable as global?

    Hello all.
    Apologies for my ASP being so rusty, but, how do you declare a variable as global so that it may be accessed within a function?

    Code:
    Dim strLangID
    strLangID = getLangID
    
    Function Whatever()
    	'''''''''' here i want to access strLangID
    End Function
    All help is appreicated.
    Many thanks.
    Last edited by solitario; Aug 23rd, 2008 at 10:39 AM. Reason: [RESOLVED]

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: declare a variable as global?

    Declare it outside the function, just like you have.

    Use it, as you plan to.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2004
    Posts
    121

    Re: declare a variable as global?

    Thanks mendhak. I thought I would need a global keyword or something.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] declare a variable as global?

    If you can, you probably should move over to ASP.NET. I am suggesting this because it appears like you're coming back to programming after a while... for a new application?

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