Consulting

Page 1 of 2 1 2 LastLast
Results 1 to 20 of 26

Thread: Create VBA add-in

  1. #1
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location

    Create VBA add-in

    Hi,

    Does anyone know how to create a VBA add-in? I'm just curious. The two I like the best have been Mark Rowlinson's Code Indenter (by far my most favorite!) and Juan Pablo Gonzalez' VBHTML Maker. I've an idea for one and I would like to develop it, but I don't know where to start. Does this have to be done with VB? This is just kind of a side project of mine. Thanks!

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    I believe it has to be VB, though I am not 100% on that. The few I have used had to be installed from Windows and the installer looked like VB.

    So what's you're idea? Or is it top secret?

  3. #3
    VBAX Regular
    Joined
    Jun 2004
    Location
    The Netherlands
    Posts
    34
    Location
    to create an add-in you might take a look at:
    http://support.microsoft.com/default...d=kb;DE;282847

    or
    http://www.exceltip.com/show_tip/Cel...Excel/495.html

    I hope this is of any use for you.
    Cheers!
    Jeroen

  4. #4
    VBAX Tutor
    Joined
    May 2004
    Location
    Germany, Dresden
    Posts
    217
    Location
    If you use pure VB (and I don't believe it will work just using VBA) you can already pick AddIn as project-type. VB then will create a connection-designer and a basic form for you automatically.
    I once created a very simple addin for VB6 using that template and I it was much easier than I thought.
    I have not yet tried developing an VB-Addin for my Office-Apps, but as far as I've see the addin-designer supports connection to the "Visual Basic for Applications IDE", so it might be worth a look.

  5. #5
    VBAX Regular
    Joined
    Jun 2004
    Location
    The Netherlands
    Posts
    34
    Location
    here another option. it is creating a ddl and use it as add-in:
    How To Create Office COM Add-Ins by Using VBA and Office Developer
    http://support.microsoft.com/default...b;en-us;306130

  6. #6
    VBAX Tutor SJ McAbney's Avatar
    Joined
    May 2004
    Location
    Glasgow
    Posts
    243
    Location
    Simplest way is to create a spreadsheet, only do some VBA in it with some forms to achieve your goal.

    Save your spreadsheet as an .xla file and then Browse for it in the Add-ins menu.

    Access is a little different and involves creating a table with installation details.

  7. #7
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Quote Originally Posted by Abulafia
    Simplest way is to create a spreadsheet, only do some VBA in it with some forms to achieve your goal.

    Save your spreadsheet as an .xla file and then Browse for it in the Add-ins menu.

    Access is a little different and involves creating a table with installation details.
    For a VBA Add-in? I see an Add-in Manager in VBA, but no browse button. Or were you thinking of an Excel Add-in?

  8. #8
    VBAX Tutor SJ McAbney's Avatar
    Joined
    May 2004
    Location
    Glasgow
    Posts
    243
    Location
    Quote Originally Posted by DRJ
    Or were you thinking of an Excel Add-in?
    Since this is an Excel forum, that's exactly what I was talking about.

  9. #9
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Yeah, I've got the XLA's down pretty good now. (Been making a few of those, work has been loving them.) But I was talking about VBA add-ins, I was thinking the DLL route. I'll check out those links, thanks for those!!

    And no Jake, it's not top secret (LOL), I was using Mark's (absolutely fabulous!) code indenter addin, and wanted to make one that commented out all selected code. Add it to the right click menu and all. There's probably one already out there, but I really wanted to learn how to make my own, I like doing that kind of stuff, that's how I learn best. So if there's already one out there, don't burst my bubble! LOL

  10. #10
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Oh, also, does anybody know of an example DLL that I can take apart and see how it works? And what would I use to edit it with? Just looking for some hints.

  11. #11
    Knowledge Base Approver VBAX Expert brettdj's Avatar
    Joined
    May 2004
    Location
    Melbourne
    Posts
    649
    Location
    Zack,

    I think that Tommy and Smozgur have both played around with DLL addins. Might be worth a PM.

    I believe that the DLL addins offer more security than the flimsy xla protection

    Cheers

    Dave

  12. #12
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    Zack,

    Best way is to use VB 6.0 if it's available. As for developing in Office You need the Developer Version (which is not very good) and it's only available upto version 2002.

    For version 2003 it's called Visual Studio Tools for Office System and require Visual Studio.NET 2003 installed (and it only works with Excel 2003 and above)

    At present I'm translating a swedish articles I wrote for some years ago to english on how to build COM add-ins but I'm not sure when I've finished it.

    Let me know if You need to know more about it

    Take care buddy,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  13. #13
    Knowledge Base Approver VBAX Expert brettdj's Avatar
    Joined
    May 2004
    Location
    Melbourne
    Posts
    649
    Location
    Hi Dennis,

    That would be a handy article - looking forward to it

    Cheers

    Dave

  14. #14
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Yes, that would definitely be an excellent read!

    I just fot VB v.4.0 and am looking into getting VB 6.0. Even though I know nothing about VB as of yet, I'm determined to teach myself. I figure this is probably one of the simplest tasks I'll (probably) ever use it for, so it would be a good starter. I don't do very well with tutorials, I've gotta get my hands dirty and delve into it, pick it apart, to learn best.

    Thanks for all your input guys, much appreciated! So let me know when you're done with that article, I would absolutely love to read it.

  15. #15
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    OK, I will post the link here

    [Edit]: I just remembered that COM Automation Add-ins (for functions that can be direct called from worksheets or VBA) can't be created with the Office Developer version since the class-module require "Public Creatable"
    (Which is one of the stupid things with the MOD...)

    Enjoy the weekend and the Olympic Games in Greece,

    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  16. #16
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Quote Originally Posted by Dennis W
    OK, I will post the link here
    Great! Thanks! I'll be very much looking foward to it.

    Enjoy the weekend and the Olympic Games in Greece
    I will have a great weekend, you do the same!

  17. #17
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Don't know if this will help, as I've never tried to make an addin, but in 'Visual Basic Edit' click onto 'object browser' then select either addin or addins and then help (?). This appears to give instructions and the code for creating and using (etc) your own addins.

  18. #18

  19. #19
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    Hi everyone,

    Tommy's nice reminds me about my own compiled collection of MS Knowledgebase-articles which can be viewed here (in plain english :

    http://www.excelkb.com/article.aspx?id=10008

    Kind regards,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  20. #20
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Thanks for the links guys! I really want to make use of the VB solutions provided, but that may take me a while to really nail down. I'll definitely be doing some testing on these perscribed methods. Thanks so much to you all!

Posting Permissions

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