+ Reply to Thread
Results 1 to 3 of 3

Option Explicit function and private/public/dim

  1. #1
    Registered User
    Join Date
    03-28-2010
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    57

    Option Explicit function and private/public/dim

    What is the difference between code that has the words Option Explicit written at the top and code that does not have Option Explicit written at the top?

    Also, what is the difference between declaring a variable as

    Please Login or Register  to view this content.
    What is the difference between using public/private/dim.

    Thank you for all of your help,

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Quick Q about Option Explicit function and private/public/dim

    In a VBa module

    Highlight Option Explicit then press f1

    Same for Sub

    These help files contain a mine of information and in VBa they are more informative than many I can think of!

    Use this method for any function you need to know about!
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Quick Q about Option Explicit function and private/public/dim

    See VBE Help for Declaring Variables, Understanding Scope and Visibility, and Understanding the Lifetime of Variables.
    Entia non sunt multiplicanda sine necessitate

+ 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