How to Create a Custom Excel Add-in (Step-by-Step Guide)

Sdílet
Vložit
  • čas přidán 24. 07. 2024
  • 👉 Explore All My Excel Solutions: pythonandvba.com/solutions
    𝗗𝗘𝗦𝗖𝗥𝗜𝗣𝗧𝗜𝗢𝗡
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    Supercharge your Excel skills and productivity by learning how to create a custom Excel add-in using VBA (Visual Basic for Applications) in this easy-to-follow, step-by-step tutorial. Perfect for both beginners and advanced users, this guide will walk you through the entire process of creating your very own Excel add-in.
    VBA allows you to quickly and efficiently build custom add-ins that can expand Excel's capabilities, automate repetitive tasks, and integrate with external tools and services. It's an excellent way to get started with creating and distributing add-ins due to its user-friendliness and ease of implementation. While there are other methods, such as COM, VSTO, and Office.JS, our focus will be on VBA in this tutorial.
    By the end of this video, you'll have a custom ribbon that allows you to run any macro with ease, taking your Excel abilities to new heights!
    🌍 𝗟𝗜𝗡𝗞𝗦:
    ▶ GitHub Repo: github.com/Sven-Bo/excel-add-...
    ▶ Office RibbonX Editor: github.com/fernandreu/office-...
    ▶ MyToolBelt Add-in: pythonandvba.com/mytoolbelt
    ▶ Office imageMSO icon library: bert-toolkit.com/imagemso-lis...
    ▶ Blog Post (XML/VBA Starter Code): bettersolutions.com/vba/ribbo...
    ▶ Microsoft Custom UI Docs: learn.microsoft.com/en-us/ope...
    ⭐ 𝗧𝗜𝗠𝗘𝗦𝗧𝗔𝗠𝗣𝗦:
    0:00 - Introduction
    1:06 - Creating an XLSM File
    1:30 - Customizing the Excel Ribbon
    5:12 - Integrating ChatGPT
    7:45 - Adding More Buttons to the Add-in
    10:39 - Exploring Other Custom UI Elements
    11:30 - Distributing Your Add-in
    13:00 - Outro
    𝗧𝗢𝗢𝗟𝗦 𝗔𝗡𝗗 𝗥𝗘𝗦𝗢𝗨𝗥𝗖𝗘𝗦
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    🆓【𝗙𝗥𝗘𝗘】Excel Add-in (𝗠𝘆𝗧𝗼𝗼𝗹𝗕𝗲𝗹𝘁): pythonandvba.com/mytoolbelt
    📊 Dashboard Excel Add-In (𝗚𝗿𝗮𝗳𝗹𝘆): pythonandvba.com/grafly
    🎨 Cartoon Charts Excel Add-In (𝗖𝘂𝘁𝗲𝗣𝗹𝗼𝘁𝘀): pythonandvba.com/cuteplots
    🤪 Fun Emoji Excel Add-In (𝗘𝗺𝗼𝗷𝗶𝗳𝘆): pythonandvba.com/emojify
    📑 Excel Templates: pythonandvba.com/go/excel-tem...
    🎓 My Courses: pythonandvba.com/go/courses
    📚 Books, Tools, and More: pythonandvba.com/resources
    𝗖𝗢𝗡𝗡𝗘𝗖𝗧 𝗪𝗜𝗧𝗛 𝗠𝗘
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    🔗 LinkedIn: / sven-bosau
    📸 Instagram: / codingisfun_official
    💻 GitHub: github.com/Sven-Bo
    💬 Discord: pythonandvba.com/discord
    📬 Contact: pythonandvba.com/contact
    ☕ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲?
    If you want to support this channel, you can buy me a coffee here:
    ▶ pythonandvba.com/coffee-donation

Komentáře • 113

  • @CodingIsFun
    @CodingIsFun  Před rokem +5

    *Hope this video helps you to create your own Excel add-in!* 🚀
    Here are all the relevant links:
    👉GitHub Repo: github.com/Sven-Bo/excel-add-in-tutorial-template
    👉Office RibbonX Editor: github.com/fernandreu/office-ribbonx-editor/releases/tag/v1.9.0
    👉MyToolBelt Add-in: pythonandvba.com/mytoolbelt
    👉Office imageMSO icon library: bert-toolkit.com/imagemso-list.html
    👉Blog Post (XML/VBA Starter Code): bettersolutions.com/vba/ribbon/document-level-customui-editor.htm
    👉Microsoft Custom UI Docs: learn.microsoft.com/en-us/openspecs/office_standards/ms-customui/d842006e-3187-4f66-a17d-0819a3cc94b5

  • @JimmyBuffetParrotVomit
    @JimmyBuffetParrotVomit Před 5 měsíci

    Great walk through video! I've spent the afternoon installing Visual Studio and trying to figure out their IDE and how to build an Add In through the project template but this is 1000x simpler and works for sharing a few work tools with coworkers... Thanks!

    • @CodingIsFun
      @CodingIsFun  Před 5 měsíci

      Glad to hear that you liked the video. Good luck with your add-in. I am sure your coworkers will love it! :) Cheers, Sven ✌️

  • @christianrauth1425
    @christianrauth1425 Před rokem +2

    Great that you are back 🚀
    I should think of creating my own Excel Add-In 🤓

    • @CodingIsFun
      @CodingIsFun  Před rokem +1

      Thanks, Christian!
      Go for it and happy coding! 🚀🤓

  • @jomo.alfredo
    @jomo.alfredo Před 7 dny

    You are a talented teacher. Thanks so much.

    • @CodingIsFun
      @CodingIsFun  Před 7 dny

      Glad to hear that you like my teaching style. Cheers, Sven ✌️

  • @balazspalinkas7848
    @balazspalinkas7848 Před 2 dny

    This is an amazing video!! Thanks so much for taking the time to explain!!

    • @CodingIsFun
      @CodingIsFun  Před 2 dny

      Glad it was helpful! Thanks for watching! Cheers, Sven ✌️

  • @ricardo.alves.campos
    @ricardo.alves.campos Před rokem

    Welcome back, very nice video!

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thank you, Ricardo! I appreciate all your support! 👍

  • @ajayhuestis4981
    @ajayhuestis4981 Před 5 měsíci

    I've been needing to create my own ribbon add in for a while and this was super easy to follow and straight forward. Thanks!

    • @CodingIsFun
      @CodingIsFun  Před 5 měsíci

      Happy to hear that you liked the video. Good luck with your add-in and happy excelling! Cheers, Sven ✌️

    • @ajayhuestis4981
      @ajayhuestis4981 Před 5 měsíci

      On a side note. I don’t suppose you’re planning another video with how to make the custom tick marks on your add in?

    • @CodingIsFun
      @CodingIsFun  Před 5 měsíci

      @@ajayhuestis4981 I am afraid you are right. I will most likely focus more on Python-related content in the future. I might only sprinkle in some VBA videos here and there.

  • @Ghfcvhycvyy
    @Ghfcvhycvyy Před 8 měsíci +2

    Very very good video!

  • @zialielmahdy
    @zialielmahdy Před rokem +2

    Thank you, that was good

    • @CodingIsFun
      @CodingIsFun  Před rokem +1

      Glad you liked it. Thanks for watching and taking the time to leave a comment! 👍

  • @user-qy7ss1qr4k
    @user-qy7ss1qr4k Před 4 měsíci

    THANK YOU!

    • @CodingIsFun
      @CodingIsFun  Před 4 měsíci

      My pleasure! Appreciate you taking the time to watch and leave a comment. Cheers, Sven ✌️

  • @PatrickAngwin
    @PatrickAngwin Před 9 měsíci +1

    Hey Sven, great tutorial. I've been thinking for a while now that I'd like to learn how to create an Excel add-in with a custom ribbon tab and icons, etc, to give myself easy access to macros I've developed which could be useful across different workbooks, etc. Today I followed your step-by-step guide and it all worked perfectly: I now have a personalised ribbon tab with my first custom icon to launch a little routine I wrote, plus I've taken the liberty of adding your two IFERROR tools, which no doubt will also come in handy.
    If you ever have the time and the inclination to do a follow-up video to explain more advanced techniques using some of the different elements you mention briefly starting at 10:43, that would be great!... But in the meantime, thanks for this excellent introductory lesson which was enough to get me up and running.

    • @CodingIsFun
      @CodingIsFun  Před 9 měsíci +2

      Hi Patrick,
      Thank you so much for the positive feedback! I'm thrilled to hear you were able to create your own add-in. I've noted your suggestion regarding a follow-up video, but I can't make any promises at this moment.
      In the meantime, you might want to explore this wonderful playlist from a fellow CZcamsr. It includes more in-depth tutorials on how to add advanced ribbon elements: czcams.com/video/ypI2VXYaXQI/video.html&ab_channel=VBAA2Z
      I hope it proves helpful! Happy Coding!

  • @SaifulBappy
    @SaifulBappy Před rokem +1

    Great Helpfull

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!

  • @vinodganger4038
    @vinodganger4038 Před 2 měsíci

    Thanks for giving link these will help to to study more advance way

    • @CodingIsFun
      @CodingIsFun  Před 2 měsíci

      An absolute pleasure, very happy to hear that you found it useful! Cheers, Sven ✌️

  • @haninawaya9967
    @haninawaya9967 Před rokem +2

    That is awesome 🎉❤

    • @CodingIsFun
      @CodingIsFun  Před rokem +1

      First comment! :) Thank you! Happy Developing! 🤓

    • @haninawaya9967
      @haninawaya9967 Před rokem

      @@CodingIsFun I always wait for your great videos 📷

    • @CodingIsFun
      @CodingIsFun  Před rokem +1

      @@haninawaya9967 Thanks for your support! 🙏

  • @init_yeah
    @init_yeah Před rokem +2

    Its been a while hope you can make even more exciting videos!

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Yes, I took a small break from CZcams in March as I was on vacation. But rest assured, there will be more videos coming in the future! :)

  • @kit-kit-kittty2911
    @kit-kit-kittty2911 Před 5 měsíci

    very nice

  • @user-xp1ge5bf4h
    @user-xp1ge5bf4h Před měsícem

    This is really good. Thanks! Can I use this to add into Powerpooint and Outlook?

    • @CodingIsFun
      @CodingIsFun  Před měsícem

      You can also crete PowerPoint and Outlook add-ins. The process is similar, but not the same. For you reference: stackoverflow.com/a/37548779
      I hope it helps! Happy Coding! Cheers, Sven ✌️

  • @robertcenusa8636
    @robertcenusa8636 Před rokem +2

    As always, 10/10 video 👏
    Though, I need to ask: would you consider making an advanced version like, hiding all other tabs and locking for the user the possibility to show them again or to see the vba codes from behind?

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thank you for watching and for your feedback. I appreciate your suggestions for an advanced version of the tutorial. However, at this point, I'm not planning to create one. That being said, I never say never, but I can't make any promises 😅. Thanks again for your support.

  • @rahuldev7779
    @rahuldev7779 Před 9 měsíci

    Very nice

  • @masotolazarus1971
    @masotolazarus1971 Před měsícem

    Hi Sven, Great Video thanks for sharing. it would be great if Excel Lambdas could be turned to Add-ins any idea if this is possible? many thanks

    • @CodingIsFun
      @CodingIsFun  Před měsícem

      Hi there! Thanks for watching. Accessing lambda functions directly in VBA isn't possible, but there's a workaround you might find useful. You can actually create your own functions within VBA. These functions become available to anyone with your add-in installed. For example, I recently developed an "AI Formula" that connects to the OpenAI API. Check out this video for a demo: czcams.com/video/m69UeA27jFo/video.html
      Also, if you're interested in creating your own user-defined functions, here's a guide that could help: trumpexcel.com/user-defined-function-vba/
      Hope this helps! Happy Coding! Cheers, Sven ✌️

  • @krishnashravan
    @krishnashravan Před 10 měsíci +1

    Very detailed video
    a small doubt: I'm trying to connect to the azure open ai service(instead of open ai) what changes should have to make in the code

    • @CodingIsFun
      @CodingIsFun  Před 10 měsíci

      Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @JoeMcMullin
    @JoeMcMullin Před 5 měsíci

    Would absolutely love a tutorial on how you made the Table of Contents WITH clickable screenshots!! Genius!! I am really enjoying your Add-in "My Tool Belt" Pro version is perfect.

    • @CodingIsFun
      @CodingIsFun  Před 5 měsíci +1

      Happy to hear you're enjoying the MyToolBelt PRO Version! Your video request is definitely noted, but creating a detailed walkthrough of the TOC feature might be a bit out of reach at the moment, since I’m currently diving deeper into Python topics. Seems to resonate better with the audience for some reason. But hey, never say never, right? Anyways, super happy to hear you liked the video and are enjoying the MyToolBelt add-in. Cheers, Sven ✌

    • @JoeMcMullin
      @JoeMcMullin Před 5 měsíci

      @@CodingIsFun maybe a comment pointing towards some resources on the topic of adding linked screenshot macros??? Worth asking 😊

  • @barcode6495
    @barcode6495 Před rokem +1

    Good morning. Great videos. Very knowledgeable person and professional. I was wondering if you could post a video on pivot tables using python. Thank you!😊w

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thanks for the kind words and your video suggestion! :)

  • @finessejones3109
    @finessejones3109 Před rokem +1

    New sub: Thank you for your video this is exactly what I been looking for. I followed your instructions several times and I keep bringing back a error code stating my api key is invalid but I generate 3 different ones and still same error

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thanks for watching. Please have a look at the following possible solution: github.com/Sven-Bo/Integrate-ChatGPT-in-Excel-using-VBA#common-issues-and-solutions

  • @servatechtips
    @servatechtips Před rokem +4

    Wooow, it's so cool, can you another video for word Add-in?

    • @CodingIsFun
      @CodingIsFun  Před rokem +1

      Glad you liked it and thanks for your video suggestion :)

  • @konradg1543
    @konradg1543 Před rokem +2

    Nice! Where are you creating these graphics/animations, like in 0:14? You download it, or making urself?

    • @CodingIsFun
      @CodingIsFun  Před rokem +1

      Thanks for watching. That is a lottie animation: lottiefiles.com/

  • @dirtydevil81
    @dirtydevil81 Před rokem +2

    Top Video! Thank you! I wished, somebody would do similar videos, e.g. in that quality, for OpenSource Software like Libreoffice Writer or Calc. Would you mind, stepping into these ? ;)

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thank you for taking the time to watch the video and for your kind words! I'm glad to hear that you found it helpful. I appreciate your suggestion, but unfortunately, I do not have much experience using those programs. Throughout my career as a data analyst, I have primarily used Excel. 😅

  • @sujungpark5764
    @sujungpark5764 Před rokem

    Hi Sven :) did you have nice time in Sri Lanka ?
    And this video is really cool !

    • @CodingIsFun
      @CodingIsFun  Před rokem +1

      Hey Sujung! Thanks for watching. So happy you liked the video! Oh, and Sri Lanka was a blast, had an awesome time there! 🎉

  • @alexmorton5556
    @alexmorton5556 Před rokem +2

    Nice Video, very helpful.
    Do you know how to make a VBA addin that opens a side pane with UI elements? Like the wikipedia addin say?

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thanks! You could do that with VSTO or Office.js Excel add-ins :)

    • @ernestoluyov
      @ernestoluyov Před 9 měsíci

      you can use visual studio and create VSTO addin (in VB or C#) add Pane object in your project. or create an office addin using visual studio or visual studio code.

  • @shiazasif8058
    @shiazasif8058 Před rokem +1

    Welcome back

  • @chuxTube68
    @chuxTube68 Před 11 měsíci +1

    I have a couple VBA functions I put together in an XLSM file and want to use it as an add-in for other sheets I create. How do I keep the XLSM from opening up when I open a file that has the add-in attached to it?

    • @CodingIsFun
      @CodingIsFun  Před 11 měsíci

      Thanks for watching. Sorry, but I am not sure what you mean

    • @ernestoluyov
      @ernestoluyov Před 9 měsíci

      I understand that your macros is in the excel file (XLSM) embedded. You have to create an add-in.
      How you call your initial method?

  • @karthikmngowda
    @karthikmngowda Před rokem +1

    Hi Sven, how to write python code in vba macro?. Not to use runpython and call py file using xlwings, want to write python code in vba just like we write in spyder, jupyter notebook or other IDEs. Is thr any dll or settings available to do so.

    • @CodingIsFun
      @CodingIsFun  Před rokem

      VBA is its own scripting language associated with Microsoft Office products and does not support writing Python code within it. You can call external Python scripts via certain methods (like RunPython in xlwings), but there's no way to write Python code directly in VBA as if it were a Python IDE like Spyder or Jupyter Notebook.

    • @karthikmngowda
      @karthikmngowda Před rokem

      @@CodingIsFunsure got it and thank u for ur reply

  • @mhrunakshaykarnikaavyukta6034

    Can you guide me how can I publish my own add-in file to the excel add-in store so that other users able to install it in their system without my manual intervention.

    • @CodingIsFun
      @CodingIsFun  Před 8 dny

      Thanks for watching. That is only possible for Office JS Add-ins. Please refer to the office Microsoft docs: learn.microsoft.com/en-us/office/dev/add-ins/publish/publish-office-add-ins-to-appsource
      Happy Coding! Cheers, Sven ✌️

  • @mhrunakshaykarnikaavyukta6034

    Can we make a Installer software like a executable file which after installing it should automatically add my custom Add-in file in their system in excel. Please guide me how to do this task.

    • @CodingIsFun
      @CodingIsFun  Před 3 měsíci

      Thanks for watching. Have a look at the following article:
      jkp-ads.com/articles/excel-addin-installer.asp
      I hope it helps! Happy Coding! Cheers, Sven ✌️

  • @parikshitdambhare6647
    @parikshitdambhare6647 Před 6 měsíci +1

    Great video. Watching from India. I m from forest department. Really very helpful video for save jungle and wildlife. But I can't find "My add in" in your website. Please guide

    • @CodingIsFun
      @CodingIsFun  Před 6 měsíci +1

      Thanks for watching. The links, including the Excel workbook from the video, are in the description box.

    • @parikshitdambhare6647
      @parikshitdambhare6647 Před 6 měsíci

      Thank you sir for lighting speed reply ❤

  • @user-xp1ge5bf4h
    @user-xp1ge5bf4h Před měsícem

    How can I fix the error "End of Central Directory record could not be found" when I open the xlsm in the office ribbonX editor?

  • @CRITCS1990
    @CRITCS1990 Před rokem +1

    Sri Lanka 🇱🇰 ❤

  • @danesvarneelamagam8941
    @danesvarneelamagam8941 Před 9 měsíci

    How do we sell the add-in we create?

    • @CodingIsFun
      @CodingIsFun  Před 9 měsíci

      Thanks for watching. That is a broad question and hard to answer. You could list it on Gumroad and sell it there, just as one example.

  • @user-ur1bs2mq6x
    @user-ur1bs2mq6x Před rokem

    How do you install RibbonX on a Mac?

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thanks for watching. I think, it only works on Windows - sorry!

  • @dasolxandzo3152
    @dasolxandzo3152 Před 6 měsíci

    Sory, but when I add my add-in into Excel (like in last video part), my add-in doesn't show on top panel. How I can fix this problem?

    • @CodingIsFun
      @CodingIsFun  Před 6 měsíci

      Thanks for watching. Hard to tell from a distance

  • @NuaDeys
    @NuaDeys Před 3 měsíci

    Can I do this on a Mac? I figured not but wondering if anybody has tried?

    • @CodingIsFun
      @CodingIsFun  Před 2 měsíci

      Thanks for watching. This solution does only work on Windows. Cheers, Sven ✌️

  • @michaeljarcher
    @michaeljarcher Před 7 měsíci

    How about updating the ChatGPT for version 4, as the API have been updated. And you code will be depreaceated by 2024, a very nice bit of code I must add. Even Chatgpt itself was unable to offer this function! :-)

    • @CodingIsFun
      @CodingIsFun  Před 7 měsíci +1

      Thanks for watching. The code is already updated and I even created a video about it. Here you are ;)
      czcams.com/video/3Z96yLlDim0/video.htmlsi=l9k-1ftoQLedjpH4

    • @michaeljarcher
      @michaeljarcher Před 7 měsíci

      @@CodingIsFun Deserves a new subscriber, great job.

    • @CodingIsFun
      @CodingIsFun  Před 7 měsíci

      Welcome aboard! 🎉

  • @751saksham5
    @751saksham5 Před 4 měsíci

    Made an add in thanks but one major drawback of this is u don't have undo feature for the task u perform through this VBA add in and didn't find anything useful on internet too

    • @CodingIsFun
      @CodingIsFun  Před 3 měsíci

      Thanks for watching. Perhaps the following video/approach might help you: czcams.com/video/KqWLfCtiTKc/video.htmlsi=3MEA1KoreyfcnYnz
      Happy Coding! Cheers, Sven ✌️

  • @danesvarneelamagam8941
    @danesvarneelamagam8941 Před 9 měsíci

    Will I be able to create an add in for this ?
    czcams.com/video/VWq5d7j6ppI/video.html

    • @CodingIsFun
      @CodingIsFun  Před 9 měsíci

      Try it out! :)

    • @danesvarneelamagam8941
      @danesvarneelamagam8941 Před 9 měsíci

      ​@@CodingIsFun One thing I need to mention I got an error "Wrong number of arguments or invalid property assignment", after alot of searching I found that I needed to put "control As IRibbonControl" into the macro
      Sub MacroName(control As IRibbonControl)

    • @CodingIsFun
      @CodingIsFun  Před 9 měsíci

      @@danesvarneelamagam8941 Yes, that is exactly what I have shown at the 05:00 min mark 😉

    • @danesvarneelamagam8941
      @danesvarneelamagam8941 Před 9 měsíci

      ​@@CodingIsFun Ohh, apologies

    • @danesvarneelamagam8941
      @danesvarneelamagam8941 Před 9 měsíci

      @@CodingIsFun Ohh, apologies

  • @Nilmoy
    @Nilmoy Před 9 měsíci

    that strong german accent is quite awkward to listen to.

    • @CodingIsFun
      @CodingIsFun  Před 9 měsíci +1

      Well, every office superhero needs their unique trait! Mine just happens to be a strong German accent. 🇩🇪💪

    • @JoeMcMullin
      @JoeMcMullin Před 5 měsíci +1

      Your English is perfect! Better than my German which is NON existent. Keep up the amazing work and the passing of knowledge. The pace of your instruction is spot on and the level of information you provide is great. Thank you!!! @@CodingIsFun

    • @CodingIsFun
      @CodingIsFun  Před 5 měsíci

      @@JoeMcMullin Thanks for the kind words! I really appreciate it! 🙏👍

  • @user-vq5vb6ww4z
    @user-vq5vb6ww4z Před rokem

    i followed you step by step but when i get excut the file excel macro after changing on office !ribbonX Editor it sais the next '' Sorry, we couldn't find C....................xlsm. it is possible it was moved, renamed or deleted? ''
    what's the probleme
    PM: in the video, it's 07:24 exactly

    • @CodingIsFun
      @CodingIsFun  Před rokem

      Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.

    • @user-vq5vb6ww4z
      @user-vq5vb6ww4z Před rokem

      @@CodingIsFun can you help me? maybe by using the app AnyDesk ?? please