Results 1 to 8 of 8

Variable scope

Threaded View

  1. #1
    Registered User
    Join Date
    03-10-2013
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    62

    Variable scope

    Hi All:

    I have the following problem:

    sub mainsub
    
      sub1 'cat'
    
    end sub

    sub sub1(foo)
    
      sub2 'dog'
    
    end sub
    sub sub2(foo)
    
        'The debugger tells me that the value of foo is 'cat'!!!!  I want it to be 'dog'.
       Why is the value of foo not local to sub2??
    
    end sub
    Thanks,

    Yossi
    Last edited by arlu1201; 03-12-2013 at 01:32 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1