Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Oct 2003
    Location
    Toronto, Ontario, Canada
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do add-ins differ from VBA macros (Any)

    I have been writing VBA macros for a few years and getting tons of help from Woody's Lounge entries. I have heard a little about add-ins as an alternative to macros but not enough to understand them.

    I am hoping they will solve a minor annoyance I have, that being when I have run a macro or been in the visual basic editor in Excel, Outlook, Access, etc. and close the editor but keep the workbook (or whatever) open, I find that the VB editor re-opens on its own if the screensaver has come up. Usually I close the whole application to avoid this, but I have an Outlook macro that autoruns when Outlook is opened (copies the text of movie listings for my local theatre from their website into an Outlook Note so it is always available on my handheld). Closing the application won't help here because the macro will be re-run on next open and I keep Outlook open all the time.

    Soooo, what are add-ins, can I create my own, and is there any likelihood that it will make this problem go away, or even get rid of the macro warning that comes up?

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

    Re: How do add-ins differ from VBA macros (Any)

    Add-ins are not an alternative to VBA code, they are alternative containers for VBA code. An add-in that has been installed/activated will be loaded automatically when the application is loaded, and VBA code in the add-in will be available to all documents.

    In Microsoft Word, an add-in is just a template (.dot) stored in Word's startup folder (by default Cocuments and Settings<username>Application DataMicrosoftWordStartup).
    In Excel, you can save a workbook as an add-in in the Save As dialog. An Excel add-in has extension .xla. The default location is Cocuments and Settings<username>Application DataMicrosoftAddins
    In PowerPoint, you can save a presentation as an add-in in the Save As dialog. A PowerPoint add-in has extension .ppa. The default location is the same as for Excel.

    There is also another type of add-in called a COM add-in. You can create them using a compiler such as C++, you can't create then in the application itself the way you can do with the add-ins mentioned above.
    I think that's the only type of add-in you can use with Outlook. So I fear they will not help you...

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: How do add-ins differ from VBA macros (Any)

    I get the VBE re-opening the way you describe only if I have opened the VBE during that session. It should not open if you ran a macro using the Macros dialog.

    By the way, if you don't mind keeping the VBE minimized after opening it, then it will stay minimized when you return from screen saver, rather than opening as the front-most window.

  4. #4
    Lounger
    Join Date
    Oct 2003
    Location
    Toronto, Ontario, Canada
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do add-ins differ from VBA macros (Any)

    Thanks Hans, don't have the compilers, so I guess I am stuck where I am. Hope MS fixes the defect that causes the editor to keep reopening.

    Stu

Posting Permissions

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