Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is it possible to set a Project Explorer Preference with VBA? Depending upon which version of Excel the User has, I would like to set the appropriate MSoft Outlook Library Object.

    Thanks,
    John

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    [quote name='jstevens' post='791899' date='03-Sep-2009 01:05']Is it possible to set a Project Explorer Preference with VBA? Depending upon which version of Excel the User has, I would like to set the appropriate MSoft Outlook Library Object.

    Thanks,
    John[/quote]
    I think that you just need to set a reference to the earlier version, when the file is opened in the newer version it should automatically update.

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Although you can set references using VBA, it's probably easier just to late bind if you have to support multiple versions.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='rory' post='791943' date='03-Sep-2009 01:25']Although you can set references using VBA, it's probably easier just to late bind if you have to support multiple versions.[/quote]

    Rory,

    I'm not sure what you mean by "late bind".

    Regards,
    John

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    [quote name='jstevens' post='792023' date='03-Sep-2009 21:47']I'm not sure what you mean by "late bind".[/quote]
    When you use late binding you declare all objects as type object and you use numbers instead of symbolic constants. Late binding does not need a reference to the object library.

    When you use early binding you must set a reference to the object library, but then you can use symbolic constants such as wdColorBlack or wdPageBreak. VBA can also help you with "intellisense" because it knows about the objects you are dealing with.

    A search on google showed lots of helpful articles, including this one.

Posting Permissions

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