Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: win 10 access 2007 what is this

  1. #1
    Board Regular
    Join Date
    Apr 2008
    Location
    Newport, RI USA
    Posts
    427
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default win 10 access 2007 what is this

    In a program I wrote many years ago I have this code
    Code:
         #If   vba3 then
             some code here
          #end  if
    What is #If vba3

    tia Jack
    The more I see of people the more I like dogs.

  2. #2
    MrExcel MVP Ron Coderre's Avatar
    Join Date
    Jan 2009
    Location
    Boston, Massachusetts
    Posts
    2,190
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: win 10 access 2007 what is this

    It's conditional code that checks the version of VBA in Excel. You'd typically use that structure if you had code that would be run by users with different versions of Excel. Some code would run on XL2003 but not later...and vice versa.

    Does that help?
    Best Regards,

    Ron Coderre
    Microsoft MVP-Excel (Oct 2006 - Sep 2015)
    Using: Excel 2010 & 2013

  3. #3
    Board Regular
    Join Date
    Apr 2008
    Location
    Newport, RI USA
    Posts
    427
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: win 10 access 2007 what is this

    If the answer also applies to access VBA then yes.
    How do I find what vba3 is/does?
    Either way thank you for the response.

    Jack
    The more I see of people the more I like dogs.

  4. #4
    MrExcel MVP Ron Coderre's Avatar
    Join Date
    Jan 2009
    Location
    Boston, Massachusetts
    Posts
    2,190
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: win 10 access 2007 what is this

    Yes....That structure applies to all MS Office VBA.
    I haven't had to use that for so long that I've forgotten which versions of VBA pertain to versions of office.
    Hopefully, this link will help:
    https://en.wikipedia.org/wiki/Visual...r_Applications
    Best Regards,

    Ron Coderre
    Microsoft MVP-Excel (Oct 2006 - Sep 2015)
    Using: Excel 2010 & 2013

  5. #5
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    15,892
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Default Re: win 10 access 2007 what is this

    vba is a subset of VB6. Don't think anything would be vb3 now.

    Using: Office 2010/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

  6. #6
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    15,892
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Default Re: win 10 access 2007 what is this

    Some interesting odds and ends related to this topic:
    http://dailydoseofexcel.com/archives...ion-arguments/

    It appears that Office 97 is VB5 (!) I'm not sure that vba3 is a predefined constant - this could have been some user-defined value (?)

    Note: For the benefit of others reading the post, a basic introduction to conditional compilation is here:
    https://docs.microsoft.com/en-us/dot...al-compilation
    Last edited by xenou; Jul 12th, 2018 at 09:03 AM.

    Using: Office 2010/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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