+ Reply to Thread
Results 1 to 7 of 7

refrencing a variable in another sub

  1. #1
    Registered User
    Join Date
    04-22-2010
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    50

    refrencing a variable in another sub

    hey guys
    here is an example

    sorry
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    'How do I refrence intid in private sub cmb1 in here..
    Last edited by pavlos; 05-17-2010 at 12:48 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: refrencing a variable in another sub

    please add CODE tags to your prior post (ie even for pseudo-code)

    see: http://www.ozgrid.com/VBA/variable-scope-lifetime.htm

  3. #3
    Registered User
    Join Date
    04-22-2010
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: refrencing a variable in another sub

    sorry
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    'How do I refrence intid in private sub cmb1 in here..

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: refrencing a variable in another sub

    Did you read the link ?

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: refrencing a variable in another sub

    Please don't repeat the question, Edit the original post
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: refrencing a variable in another sub

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: refrencing a variable in another sub

    Don't put "Dim intid" inside the sub, put it at the top of a module and make it public, so it's available to any sub().
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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