Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Dec 2001
    Location
    Cromwell, Connecticut, USA
    Posts
    40
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Activate reference via code (Office 2003 VBA)

    Is it possible to read the values of activated references and activate/deactivate the reference using VBA code? I would like to toggle the Adobe Acrobat Distiller reference based on which user is logged on, since some machines will not have Adobe Acrobat installed. This will most likely be used in Access 2003 but may apply to Excel 2003 as well.

    Thanks,
    John

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Activate reference via code (Office 2003 VBA)

    There is a references object in VBA, but I must admit I've never used it serieusly. It enables you to check if references are missing and if so, remove them.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Activate reference via code (Office 2003 VBA)

    In Access this is *very* hard to do, for if your code contains a broken (missing) reference, it will not run at all. Other Office applications are more forgiving.
    If you search this forum for isbroken you'll find some examples.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Activate reference via code (Office 2003 VBA)

    >read the values of activated references and activate/deactivate the reference using VBA code?
    I think this is what I do with my SetUp.dot installer.
    Download (almost) any package from my downloads page and read through the Setup.dot. I think the latest is SetUp072.dot.
    I have attached a ZIP file of the SetUp072.dot alone.
    You'll need to hold down the Shift key while you open it, to inhibit the auto-start macro.
    Attached Files Attached Files

Posting Permissions

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