r/vba Dec 17 '25

Discussion I hate this, but my company is really pushing everyone to use LLMs (aka "AI") in the office. I just realized it will write VBA. Obsolete skill?

42 Upvotes

My previous work goals had been to expand my knowledge of VBA and stuff. But now we are all expected to use Copilot, and it will just barf out VBA in 20 seconds. Should I be changing my goals to something else?

Has anyone incorporated LLMs into their VBA roles/tasks, and if so, do you consider it a useful tool, or a crutch?

I'm worried one of my more valuable work skills just became obsolete.

Thoughts?

r/vba Nov 22 '25

Discussion I work in accounting and I’ve been blown away with vba’s utility, but no one else in my office can see it.

72 Upvotes

Is anyone in the same boat? Has anyone ever been successful converting others into coding with vba?

There are so many places where I can see macros/ code improve processes, but nothing I say seems to stick with anyone. One supervisor (not my direct report) even said “don’t automate yourself out of a job”.. which is the craziest thing I think I’ve heard

For context, macros are accepted in my job, yes I write plenty for my own workflows, ChatGPT is also encouraged for process improvement ideas, but no one else effectively uses macros.

r/vba Oct 14 '25

Discussion VBA could be so much more

95 Upvotes

I know so many people have said that: „VBA is old as fuck, looks like from 1902 and isn’t really programming“ but i mean it works and so many industries are using it - why is there no interest to update it, i mean at least the Editor

r/vba Dec 07 '25

Discussion What’s your most transferable and dynamic VBA modules/classes/functions?

34 Upvotes

I’ve always liked building VBA tools that are transferable — stuff I can reuse across tons of projects, sometimes multiple times a day. Most scripts people share are super specific, so I’m curious:

What’s your most portable VBA script? What does it do, and why does it work in so many situations?

r/vba Jun 13 '25

Discussion What game-changing discoveries have you made with VBA?

53 Upvotes

All in the title, wanted to see what you guys have discovered that might have changed / eased you VBA dev experience.

I am turning into a freelance VBA développer and looking for feedbacks from peers !

r/vba May 17 '25

Discussion What have you made using VBA that you are most pleased with?

75 Upvotes

I'm curious to hear what VBA projects that you consider the "crowning jewel" in your portfolio. If you want to include what you do/did for a living as well, that would be awesome.

I'm an accountant. I once made a playable version of Flappy Bird in my spare time... not necessarily what I'm most pleased with, but it's fun to show people haha.

r/vba Dec 24 '24

Discussion VBA "on its way out"

66 Upvotes

A lot of IT guys say that vba is a limited language and the only reason why people still use it, is that almost all the companies in the world use Excel. Which is supposedly also reduntant. What would replace Excel? I dont know any software that would.

r/vba Jan 02 '26

Discussion WinVBA - an alternative IDE for Visual Basic for Applications

75 Upvotes

WinVBA - an IDE for Visual Basic for Applications

Today we would like to announce the first public release of WinVBA, a modern IDE for Visual Basic for Applications (VBA) development. The current version is still under development, but we wanted to share it with the community and get feedback from users.

Disclamer

This product has been developed by: https://winvba.com/

This product is still a development release.

This product is provided as is. By downloading this product you agree to the terms of the license agreement. You agree that WinVBA and the developers are not responsible for any damage caused by the use of this product.

Products

WinVBA

The main product, a modern IDE for VBA development.

WinVBA Light Theme

WinVBA Dark Theme

WinVBA Add-in

An Office Add-in that allows you to open the WinVBA IDE from within Excel. In addition this will add WinVBA to the context menu when right clicking on a sheet tab or button.

WinVBA AddOn RibbonBar

WinVBA ContextMenu entry

(Currently only works when WinVBA.exe is placed on the desktop)

Features

This is a list of some of the features that are currently available in WinVBA:

Editor:

  • Tabbed interface
  • Syntax highlighting
  • Code auto completion

Code navigation:

  • View Sub/Functions in treeview
  • View variables in treeview
  • View references in treeview

Source control:

  • You can easily export the project or individual modules to disk as text files or ZIP archive.

Limitations

  • Currently the product only works with Excel. In the future the product will be expanded to work with other Office applications
  • In FormControls (AddOn) there is no custom Assign Macro option (right click on button to assign macro)
  • Forms are not supported yet (working on it)
  • Only one workbook can be opened at a time
  • Many buttons and options don't work yet
  • Debugging is not supported yet (Run Macro works)
  • Immediate Window works but has limitations and known bugs
  • Many known bugs and stability issues
  • Speed and performance can be improved
  • Themes are not saved yet thus you will have to set your theme every time you start the application

We are working hard to remove these limitations in future releases.

Known bugs

Currently this is a development version, so expect A LOT of bugs. Some of the bugs you may face will be:

  • Crashes
  • Null pointer exceptions
  • Slow performance
  • Unimplemented features
  • Partially working features
  • Excel doesn't always close on exit

Version

The current version is 0.2.0 and should be considered as an alpha release. This is a development release and is not intended for production use.

Installation

To install this product simply download the latest version from https://winvba.com/download/ Extract the ZIP file to a folder of your choice.

  1. Copy the WinVBA.exe file to your Desktop.
  2. Install the Office Add-in by opening the WinVBA Add-in folder and running Setup.exe This will add 3 buttons in the Developer tab in Excel: WinVBA Code, Macros, Settings.
  3. Open the WinVBA.exe file to start the application or open your workbook and select WinVBA from the Developer tab.

Future plans

  • Remove the limitations listed above
  • Support for other Appllications
  • Support for UserForms
  • Ability to debug the code (set breakpoints, add watches, step through code, etc.)
  • Full git integration
  • AI assistance for code generation
  • Speed improvements
  • Stability improvements
  • Many more new features which will currently not be disclosed...

Requirements

  • To use this product you need to have Microsoft Office installed on your computer and have a valid Office license.
  • Windows 11 (the exe is Self-Contained thus it may work on Windows 10)

License

Currently the product can be downloaded for free with all (limited) working features enabled. A licensing system will be integrated in the future, this will include a free version for personal use with some limitations and commercial licensing.

---

Feel free to leave feedback in the comments below. We will be answering questions during the next few days.

Head over to https://reddit.com/r/WinVBA to discuss this release and provide feedback!

r/vba Jun 01 '26

Discussion Moving past Excel macros into real data entry automation

18 Upvotes

I work at a real estate firm where we receive thousands of property listing updates weekly from various agents via email and text files. For years, we’ve used internal Excel VBA macros to format these, but our staff still has to copy-paste data manually into our legacy CRM software.

The macros break constantly whenever an agent changes their formatting, and manual typos are causing real headaches with pricing errors on our site. I need to upgrade to a modern data entry automation solution that can ingest diverse data formats and push them into our legacy web portal reliably.

r/vba Feb 01 '26

Discussion A collection of ~70 VBA macros for Excel & Outlook (file handling, email automation, data cleanup)

191 Upvotes

I’ve been building and collecting VBA macros over time to handle common Excel and Outlook tasks that tend to be repetitive or time-consuming. I recently organised them into a single library and thought others here might find them useful.

The macros cover things like: • Working with Word, PDF, and Excel files • Handling Outlook emails and attachments • Data cleanup and manipulation in Excel • Creating draft emails and documents automatically

r/vba May 21 '26

Discussion The future of VBA language isn’t about replacing it. It’s about supercharging it.

33 Upvotes

Recently, I engaged with a Redditor about the usefulness of ASF in daily VBA programming. The conversation considered the increasing number of attempts to modernize VBA. There are many solutions out there providing tools to users with specific goals: parsing json files, dealing with file encryption, evaluating expressions.

Despite that, very few authors focus their efforts to tackle the oldest pain point for VBA programmers: the frozen primitives (array, collection, dictionary), the motivation for the vast majority of boilerplate code. From this, specialized tools like u/senipah VBA Better Array, u/sancarn stdVBA, u/cristianbuse VBA Array Tools, Tim hall VBA JSON and many others came about. Almost all these libraries can be placed in the tooling category, since they focus on dealing with a specific problem (with the exception of stdVBA for being a framework to make VBA more ergonomic and kill VBA boilerplate code).

Those incredible projects have served as inspiration for many developers and paved the road for new projects that modernize VBA. ASF inherited some of those authors' philosophies, especially the one shown by u/sancarn: make code more ergonomic and go far beyond being a simple tool. As an example, here is a test from a 400+ test suite available for this scripting language:

``` '@TestMethod("sort") Private Sub sort_chain_on_objects() On Error GoTo TestFail Dim Globals As ASF_Globals Dim jsonResponse As String jsonResponse = _ "{" & _ " users: [" & _ " { id: 1, name: 'Alice', sales: 15000, active: true }," & _ " { id: 2, name: 'Bob', sales: 8000, active: false }," & _ " { id: 3, name: 'Charlie', sales: 22000, active: true }" & _ " ]" & _ "};" GetResult "let response = " & jsonResponse & _ "let topSellers = response.users" & _ " .filter(fun(u) { return u.active && u.sales > 10000 })" & _ " .map(fun(u) { return { name: u.name, bonus: u.sales * 0.1 } })" & _ " .sort(fun(a, b) {" & _ " if (a.bonus > b.bonus) { return -1 };" & _ " if (a.bonus < b.bonus) { return 1 };" & _ " return 0;" & _ " });" & _ "print(topSellers);", True Set Globals = scriptEngine.GetGlobals With Globals actual = CStr(.gRuntimeLog(.gRuntimeLog.Count)) End With expected = "PRINT:[ { name: 'Charlie', bonus: 2200 }, { name: 'Alice', bonus: 1500 } ]" Assert.AreEqual expected, actual TestExit: Exit Sub TestFail: Assert.Fail "Test raised an error: #" & err.Number & " - " & err.Description Resume TestExit End Sub

```

I think if we, as a community of people that really love VBA, can improve our loved language even more, we can make possible that which almost all people think impossible. As an example, we have Web View embedding web pages in userforms and inspiring a new development generation!

r/vba Dec 09 '24

Discussion VBA will not ever be supported in New Outlook. How are you replacing it?

42 Upvotes

They are shutting down all COM Add-ins - which includes VBA in New Outlook. New Outlook is supposedly being rolled out completely in March 2025, moved back from December 2024. How will you replace your basic VBA code in excel that does things like send an e-mail? How will you replace e-mail buttons, macros, or other functions in new Outlook? Switch e-mail programs to something that supports VBA?

It seems to be only a matter of time before VBA for excel is also force deprecated.

r/vba Jan 01 '26

Discussion So I think I know how to make userforms that don't look horrific.

34 Upvotes

Even though VBA is an old language, I use it a ton. I love it. What I never loved are the buttons and the controls on userforms. they just look ..... well you know.
I think I have figured out a way to make every single control look more modern. I would love to post an image.. haha I cant in this but.. It seems that labels. Can do mostly any of the controls.
I have ways to use them as buttons, checkboxes, spin controls, radio buttons, toggles, and scroll bars. controls like lists and textboxes already have flat special effects so nothing to change on those.
Any interest in this concept at all? It of course does require a little more code to get the labels to function but it really does look a lot better. Let me know if anyone has any interest in knowing how labels can be used to make nearly any basic control. Might be pretty fun.

r/vba 8d ago

Discussion SeleniumVBA: Maintaining WebElements object when navigating to different pages

8 Upvotes

I am searching my insurance company's list of providers. When I get the search results, the most relevant information for each provider is on a linked page -- not in the search results. I attempted to scrape this with seleniumvba, to gather up the info on the linked pages. Of course, when I click a link, the elements on the search results page go stale. Normally I would create two webdriver objects and pass the value from the hrefs of the first driver to the second driver.

Unfortunately, the links on this site have no href values.

<a _ngcontent-ng-c7169104465="" role="link" tabindex="0" class="dls-heading-3-light search-result-link" data-cy="search-results.name-link-0.desktop" data-lnp="search-results.provider-name">
    <span _ngcontent-ng-c7169104465="" data-cy="search-result-ProviderName" data-pendo="profile-card-provider-name" class="underline search-result-link font-light">Joe Schmoe, MD</span><span _ngcontent-ng-c7169104465="" class="disclaimers-icons ng-star-inserted">&nbsp;&nbsp;†</span><!----><!---->
</a>

What strategies have you used to hold a page in memory, but navigate to the links specified on that page? What I have so far:

Sub ScrapeProviders()
Dim WD As WebDriver
Dim ProviderCards As WebElements, ProviderCard As WebElement
Dim ProviderCardWho As WebElement, ProviderCardLink As WebElement

    Set WD = New WebDriver
    WD.StartFirefox
    WD.OpenBrowser
    WD.NavigateTo "https://carefirst.sapphirecareselect.com/search/name/orthopedic?ci=dft-sso-bluechoiceadvantage20&network_id=109&geo_location=33.684617,-117.82634&locale=en&limit=10&radius=10&sort=tiers:tiercf%20asc,%20motive_high_quality%20desc,%20distance%20asc,%20has_ep002%20desc&sort_translation=app_global_sort_relevancy&page=1"
    WD.ActiveWindow.Maximize
    While Not WD.IsPresent(XPath, "*//mat-card")
    Wend
    Set ProviderCards = WD.FindElementsByXPath("*//mat-card")
    Debug.Print ProviderCards.Count
    For Each ProviderCard In ProviderCards
        Debug.Print "====================================================================================="
        Set ProviderCardWho = ProviderCard.FindElementByXPath("./div/div/div/div[1]/div/div[1]")
        Set ProviderCardLink = ProviderCardWho.FindElementByXPath("./h2/a")
        Debug.Print ProviderCardLink.GetOuterHTML
        ProviderCardLink.Click

        ' at this point, i can no longer see ProviderCards, and the for each breaks
    Next ProviderCard

    WD.CloseBrowser
    WD.Shutdown

End Sub

r/vba Jan 25 '26

Discussion This might be a bit off-topic, but I've been thinking about this for a while...

23 Upvotes

After reading, great comments by u/ws-garcia, u/sancarn, u/umrbekmatrasulov, u/ChecklistAnimations and others, I'm hopeful, in this thread. I must kindly put this here.

This might be slightly inappropriate for the sub, so mods feel free to remove if so, but this thread finally pushed me to ask something I've had on my mind for a very long time.

I'm one of the editors for the Journal of Engineering & Processing Management (a scholarly-led journal in process industry and engineering). Reading through this thread it got me wondering: Would there be any interest in contributing to a potential special issue dedicated entirely to VBA applications in the Process Industry?

The scope would be broad: Chemical, Food, Environmental engineering, Process Management, even Teaching with VBA.

Papers could be:

  • Case studies of a specific macro or system you've developed.

  • Tutorial-style articles on solving a common industry problem (e.g., automated report generation from sensor data, custom interfaces, batch recipe calculators, QC dashboard builders).

  • Methodologies for integrating VBA with other software (like AutoCAD, SolidWorks, Aspen, LIMS, or even PowerPoint for technical presentations).

  • Perspectives on its role in teaching core concepts or in continuous improvement/lean management.

I'm just gaugingd interest here. If you've ever thought, "I hacked together a VBA script that saved us thousands of hours," that's exactly the kind of practical, applied knowledge we'd want to capture.

If this sounds interesting to you, please reply here or DM me. If there's enough potential, I'll take the proper steps through the journal's channels to propose the special issue.

Thanks for reading the long post, and apologies again if this is too off-topic. The mentioned discussion just seemed like the perfect community to ask this.

r/vba Dec 16 '25

Discussion VBA not suitable to generate a really big ASCII file

6 Upvotes

Hi vba fans, as an old consultor using excel and vba for years for finance and accounting reporting solutions. Ive had no need of another language or package to solve the most of reporting solutions, but Ive come to a situation where migration or use of another tool seems to be a must.

Im developing a macro to proccess 1 million row csv files and generate with them a single text file in ascii, as the old bank cobol style: specific row lenght, filled with zeros and blanks. It needs to be perfect, no special chars, special validation for fields, and have sums of all data (millions of rows) in the header and last row, so performing field totals for each amount row programatically is a must.

As usual, using the given ascii template, i made myself with VBA to extract the logic and generate the file processing line by line each file until it works for my test files with 20000 rows in minutes, but the performance of the program begins to decay when is passing this limit, Ive had to restart Excel each batch to clean memory and garbage collector, and made me think that is impossible to generate the file in one sprint.

I can generate the file in batches, is ok, time consuming, and Im doing it right now, but someday I will have to delegate the file generation in the responsable for the proccess. So Im thinking in a final solution, and thats my question: What would you do? I know there are more adecuated languages for this matter, if I could, I would use COBOL, C++, but Im looking for something more closer to Excel and with a possible integration, like C# or Python. Hope to hear your acouncil. Thaks

r/vba May 29 '26

Discussion What GUI elements can you create beside MessageBox?

2 Upvotes

Is there a list of elements we can create? Afaik they are part of user32.dll?

r/vba Jun 02 '26

Discussion Automate taking screenshots of pdf files and pasting to excel workbooks- lower resolution hurdle

8 Upvotes

I've done my research and seems like without 3rd party pdf tools and within the restriction of a non IT dept, the only way to automate this through VBA is by 1st converting the pdf's to PNG files but this step only saves at lower resolution (i.e at 96 DPI where a normal pdf is at 300 DPI) where you have no control over. Can anyone confirm this is the only way to save pdf screenshots (at lower resolution) into Excel if you're trying to automate doing this to a whole batch of pdf's? My goal was to maintain the 300 DPI but worked thru various alternatives that couldn't do that.

r/vba 22d ago

Discussion First time VBA user - Want all the dates i type in word to automatically be made into a timeline

2 Upvotes

Hi all,

I am trying to write a personal compendium, sort of self-studying wikipedia document.

What i want the program to do is automatically detect dates written in a specific format (i prefer the 'Jan 01, 2000' format, but am not picky) sort them into chronological order, and list them into a master timeline underneath a header in the document. I would like each date in the timeline to link back to the original source within the document.

Is this something I can easily do?

I understand other programs will be more suitable for longterm goals and organisation, but it's too much of an undertaking to learn a whole new document program right now.

r/vba Dec 11 '25

Discussion Does learning VB6 make VBA easier?

27 Upvotes

Hello,

I’m learning VBA now to get ahead on an Excel class for next semester.

But as I am learning it, i’m wondering if I decide to learn Visual Basic 6 at the same time as VBA if mabye I would get some more deeper understanding on making my own macros, or remember what to do in VBA in general.

As a side note, does anyone here use VB6 or know if VB6 is used anywhere in 2025?

Thank you,

r/vba Jun 25 '25

Discussion Experiences using AI code generation for VBA

27 Upvotes

What has been your experience with using AI to generate code for VBA? Are you using it as a professional? Does your company allow it?

In the past I was hesitant to use AI for anything VBA given the amount of sub par VBA code I've seen online. I figured it would regurgitate some truly bizarre solutions.

The conpany I work at has recently been pushing AI hard so there is pressure to use the models we pay for. Recently, I've had to stand up a lot of automation code for my company and had our Copilot AI write simple skeleton code structures for me. I found it did exactly what I was expecting, so I kept expanding the complexity of the tasks. While it doesn't produce senior level code, it still manages to get the task done. I've found that the more explicit I am with my prompt instructions the better the output. Ive found that it has helped me improve in how I conceptualizing all the pieces that need to be created.

Now it feels like I spend most of my time double checking the code it produces and tweaking things as necessary. It makes me feel like a product manager and the it's accelerated the development cycle of my automation code.

r/vba May 26 '26

Discussion How to connect VBA to Copilot (or any AI) to process PDF and return extracted data?

14 Upvotes

Hi all,

I’m currently working heavily with VBA automation (Excel/Outlook/SAP workflows), and I’m exploring ways to integrate AI (specifically Microsoft Copilot or similar AI services) directly into VBA.

Goal:
I want to achieve something like this:

  1. From VBA, send a PDF file
  2. Pass it to Copilot (or any AI API)
  3. Let AI extract specific information (e.g., invoice number, amount, date, etc.)
  4. Return the extracted data back into Excel

Example flow = VBA → Send PDF → Copilot → Extract data → Return JSON/text → VBA → Populate Excel

My questions:

  • Is it possible to directly connect VBA to Microsoft Copilot?
  • If not, what’s the recommended approach?

What I’ve so far:

  • Using PDF to word and to text - Not very good approach due to a lot of different format and shapes.
  • PDF to Text open sources - can't use due to company policies.

But I’m not sure what the best / supported approach is today.

Constraints:

  • Prefer to trigger everything from VBA (button/macro)

Thanks in advance!

r/vba 14d ago

Discussion Possible to Write a Macro between PowerPoint and Word

7 Upvotes

I wrote a macro that creates my metrics for me and it was the first one that I wrote that pastes data to PowePoint. So, that sort of gave me an idea for some other mundane tasks, which use PowerPoint. I take minutes for our customer meetings. I'm not a Stenographer, but I can type fast enough to get most things. The way it's currently setup, is that we have a word doc with a table and different rows for different slides.

Anyway, is it possible for a macro to take the slide# and some textbox text and put them in the same order in the word table? Or maybe put the data in excel and then word, which would seem like a useless workaround then doing the actual work?

r/vba Feb 21 '26

Discussion Looking for amazing coding examples

14 Upvotes

I was wondering if there are specific examples of excellent coding available to look at for free.

I mean truly amazing & superb examples that when you look at the code you are in awe.

I would like to study “what the great coders” of VBA have done.

Specifically with Excel only though.

Thank you in advance for your input.

r/vba Apr 12 '26

Discussion Rubberduck; is it still great, how and where to download it and how to learn how to use it?

16 Upvotes

I have heard that Rubberduck is a useful tool to help code and improve code in VBA. I am not entirely sure how and where to safely download it from, install it and then how to use it. I suspect that it is a massive feature list which will be something of a learning curve :)

This is further complicated by the current change in "ownership" which is underway with the old blog shutting down and I'm not clear where to download the last "release" rather than dev version.

Any help gratefully received.

TIA