+ Reply to Thread
Results 1 to 6 of 6

Declaring Variables

  1. #1
    Registered User
    Join Date
    02-04-2012
    Location
    UK
    MS-Off Ver
    Excel 07
    Posts
    12

    Declaring Variables

    Hi all,

    The workbook I am using has a few add-ins with their own code hidden away. By chance, if I happen to use one of the variable names already declared within those, will I run into trouble?

    I am currently declaring variables by;

    Please Login or Register  to view this content.

    Thanks
    Last edited by Weston33; 02-06-2012 at 05:49 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,247

    Re: Declaring Variables

    No. The scope of your variable is within the subroutine.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Declaring Variables

    Variables will not impact variables in other projects, regardless of scope, so no need to worry about that.
    Good luck.

  4. #4
    Registered User
    Join Date
    02-04-2012
    Location
    UK
    MS-Off Ver
    Excel 07
    Posts
    12

    Re: Declaring Variables

    TMShucks and OnErrorGoto0, thanks for clearing that up.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,247

    Re: Declaring Variables

    You're welcome. Thanks for the rep.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  6. #6
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Declaring Variables

    Glad to assist. Please do not forget to mark the thread solved.

+ 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