r/vba 2d ago

Weekly Recap This Week's /r/VBA Recap for the week of August 29 - September 04, 2026

Upvotes

Saturday, August 29 - Friday, September 04, 2026

Top 5 Posts

score comments title & link
15 4 comments [Show & Tell] Proposed Feature: An "Effective Formatting Inspector" so we can stop writing VBA just to diagnose Word layout conflicts
13 4 comments [Show & Tell] vbaXray v2.2 - The FRX Enigma
10 25 comments [Unsolved] Generating up to thousands of pdf files with VBA
9 5 comments [Show & Tell] [ACCESS] VBA diff tool
8 0 comments [Show & Tell] pyOpenVBA v4 Released: Full MS Access Write & O365 Apps UserForm Support

 

Top 5 Comments

score comment
18 /u/thor122088 said Providing your VBA code could help identify inefficiencies. Without that, my basic suggestion is to make sure to set screen update to false Application.ScreenUpdating = False
16 /u/ZetaPower said VBA user levels define speed. First level you mess around on worksheets. Looping through cells in a range, selecting ranges, activating sheets, having formulas in cells and what not. • Every intera...
5 /u/jeeves8 said The first thing I would ask, without even having seen it in action: How is this paid option better than the FREE methods sort/filter and copy/paste already part of Excel to get the same results? Even...
3 /u/Caudebec39 said Use "Range" in your code, instead of the Selection object. This requires writing, or re-writing VBA code, because the macro recorder shamelessly uses the Selection object exclusively.
3 /u/DonJuanDoja said Maybe not what you want, but SQL enterprise with SSRS has Data Driven Subscriptions that can generates hundreds to thousands of dynamic PDF reports and either email them or put them in a shared drive ...

 


r/vba 19h ago

Discussion How to use AI effectively with SeleniumVBA

Upvotes

I've seen more people trying to use AI to build VBA automation lately, and I think SeleniumVBA works surprisingly well with AI if you give the AI the right context.

Instead of simply asking:

“Write SeleniumVBA code to automate this website.”

I would suggest giving the AI some information about both SeleniumVBA itself and the website you want to automate.

One useful thing about SeleniumVBA is that it is written in Pure VBA, so you can actually give the library source code to the AI.

A good starting point is to provide:

  • the core WebDriver class
  • one of the test_ sample modules that is close to what you want to do

There are quite a few classes in SeleniumVBA, but you don't need to provide all of them at once.

If another class is required, you can simply ask:

“Which other SeleniumVBA class do you need to see to implement this?”

Then provide only the additional class that the AI asks for.

You can also give the AI information about the target website, such as:

  • a screenshot of the page
  • a screenshot of the selected element in the DevTools Elements tab
  • the relevant HTML

That makes a big difference.

For example, you can say:

“I want to enter the value from Excel cell A2 into this textbox, then click this button.”

Now the AI can look at:

  • the actual SeleniumVBA methods available
  • the real DOM structure of the page
  • the Excel/VBA side of the automation

and generate much more specific code.

A workflow I find useful is:

Find a relevant test_ sample
→ give the AI the WebDriver class and sample code
→ show it the DevTools/DOM information
→ ask it to write or modify the code
→ if something fails, give it the error and the current code

SeleniumVBA also works naturally with Excel, so tasks like:

“read data from a worksheet and enter it into a website”

or

“scrape data from a website and write it back to Excel”

are very straightforward.

I think the key is not to treat AI as something that magically knows every SeleniumVBA method.

Instead, give it the SeleniumVBA source code and the actual information about the website, and use it more like a programming partner that can read the same code and DOM that you are looking at.

For people who are still learning VBA, I think this can make browser automation much more approachable.


r/vba 1d ago

Solved UDF with array input not working

Upvotes

My function in VBA is just stopping, and I'm not even clear on how to debug it.

Function test(arr As Variant) as Variant
Dim n As Integer
n = UBound(arr)
test = n
End Function

If I put a break on the n=UBound line, and call the function =test(A1:A6) from a spreadsheet, execution pauses there. If I run another line, it just quits, no error. I halfway gather that Excel doesn't want to do things to inputs in a function, so maybe passing arr to the UBound function is a no-no. So I do this instead:

Function test2(arr As Variant) as Variant
Dim n As Integer
Dim new_arr As Variant
new_arr = arr
n = UBound(new_arr)
test2 = n
End Function

That works, =test2(A1:A6) outputs 6. So now let me try to do something with the values in the new array.

Function test3(arr As Variant) as Variant
Dim n As Integer
Dim new_arr As Variant
Dim x As Variant
new_arr = arr
x = new_arr(3)
test3 = x
End Function

Now the execution stops on the x = line.

This is driving me up a wall. Appreciate any help.


r/vba 3d ago

Show & Tell pyOpenVBA v4 Released: Full MS Access Write & O365 Apps UserForm Support

Upvotes

Hey all, super excited to announce this new version of pyOpenVBA:

https://github.com/WilliamSmithEdward/pyOpenVBA

Thank you for all of your support. This is truly one of the best communities on Reddit!


r/vba 2d ago

Discussion Making a VBA Macro supposed to be easier with AI but...

Upvotes

I am a macro-enthusiast and team player. I want to help my team to make out work easier and efficient.

I tried creating macro with the help of AI, but AI said to me that they can't help to generate code because it operates inside the application. i tried many times but it didn't help.

Even selenium basic can't such stuff. Have you encountered this?

My VBA language skill is terrible, but i really think that my goal in making a macro for business is doable.

Here is the thing that i asked AI. I am struggling with repetitive process in going to the internal website then login, and input the specific code that needed to search and get it paste it in the excel sheet.

it is very repetitive process, so i asked AI to help me make a macro that automatically logs in the internal repository, then search the specific code and select the dropdown to choose that data i need to see. Last is get the data and paste it in the excel file.

That what i rreally hope the AI would generate for me, but it can't due hesitation from AI. i'll show you the picture in the comment.


r/vba 4d ago

Unsolved Generating up to thousands of pdf files with VBA

Upvotes

I've a project to convert something like a huge mail merge from a legacy platform to MS Office (I guess 365). I have access to Adobe DC (the paid version) and have created code to do this with small amounts of letters/files, think of 20-30. This works fine but rather slow.

While I can generate these 20-30 files in about 2-5 minutes, the legacy system can create thousands in the same amount of time.

I want to ask the VBA wizards out there where should I poke to improve the performance of VBA? Or any other way to do this, but it unfortunately has to be with MS Office. The system is quite closed so I can not a random program I made.


r/vba 4d ago

Advertisement Creates a VBA online game with a simple server database

Upvotes

Good day, everyone!

So as the title says, I made an excel game, playable online, and it is currently in alpha (version 1.0). The VBA code is accessible to everyone for studying, the server side remains hidden for security purposes... But let's get to the point of what you CAN do there.

  1. The Excel Game Online (the name of a file and a game) is a semi-open-world 2d multiplayer game with plenty of items and interactable blocks at your disposal. You can move your character on the map, see other characters on the map build your base and progress into the map! There are purple blocks on the map which are called Vaults - interact with them to obtain items, scaling from common to mythic - each opening new possibilities! The movement is tick-based, with each tick having a 5 seconds duration (made to not lag the server). More content will be added later if there are enough players!

  2. There is a simple login system, to gain an ability to control your character, contact me and I'll assign you a nickname and a password (trivially used to access database)

  3. I am searching for alpha testers and people who are interested in this kind of games (it can change according to your "likes" and "dislikes"!). Also join the Discord server. I am just not sure if I am allowed to embed links here. Feel free to DM though! All information I will grant.


r/vba 5d ago

Waiting on OP VBA Turn HTML table into ASCII

Upvotes

Afternoon all, I'm attempting to make a "Lite Reader" in Excel for the SCP Wiki, essentially strip all unwanted data from the HTML and just display the text. I got some great advice over the weekend with regards to sanitising the web scrape but tables are still causing problems.

The bulk of the scrape renders in one column and multiple rows which is exactly what I want, but any tables will render across as well as down which is no good for my purposes, I need the table to be one column wide and can be as many rows as necessary. I've found several bits and pieces that each can do a part of what I'd like but nothing all together in one, mainly because of the restrictions to the reading area I need the end result to be 100 characters wide at max (that's the width of the reading area in the font and size I'll be using)

Here's what I've found so far and the issues I've had:

  • .getElementByTagName(table) - I can extract the table(s) data out of the HTML and into a sheet which can then be referenced for the table creation, would prefer it if the cell data was stored inside VBA rather than in an actual sheet, possibly a 2D array?
  • Ascii Table Generator - Able to copy and paste cells from sheet, set max column width (Important for the table width limit) and copy result back in to Excel, but can't copy HTML directly in and involves using an external resource, as I said I'd prefer if it all worked 'in house'. (The bit that does the conversion is written in JS, haven't managed to recreate it in VBA)
  • FSO Textstream - Found a script where you select the cells on a sheet and it writes and saves the ascii output to a txt file, I haven't managed to get it to write to something internal and don't want extra files being made, plus the columns are as wide as the cell content, need that max table width of 100char
  • Write to String - Trying the conversion myself with bits like this (not actual code, just giving you the idea)

For i = 1 To Rng.Columns.Count
  ColWidth = Column(i)_Width
  ascii_Tbl = "+" & String(ColWidth, "=")
Next i
ascii_Tbl = ascii_Tbl & "+" & vbCrlf

For n = 1 To Rng.Rows.Count
    For i = 1 To Rng.Columns.Count

      If ColWidth > LEN(Rng.Cells(n, i)) Then
      Rng.Cells(n, i) = Rng.Cells(n, i) & String(ColWidth-LEN(Rng.Cells(n, i), " ")
      Else

      ascii_Tbl = ascii_Tbl & "| " & Rng.Cells(n, i) & " "
    Next i
  ascii_Tbl = ascii_Tbl & "|" & vbCrlf
  ascii_Tbl = ascii_Tbl & String(TableWidth, "-") & vbCrlf
Next n

Which should produce something like:

+========+============+========+
| Title1 | Title 2    |Title 3 |
--------------------------------
| Data 1 | Info       | Stuff  |
--------------------------------
| Data 1 | More info  | Stuff  |
--------------------------------

Perfect for pasting line-by-line with the rest, but then there's the text wrap issue for the longer entries which involves adding in new rows and either using Fill to spill the excess down (But the sheet column has to be set to the correct width and converting char count to pixels/mm is more frustrating than I anticipated) or splitting the text at the calculated point and moving it down to the new row which isn't too much of a hassle manually but again I'd like the work to be done inside VBA rather on a sheet

The plan is:

  • Select article to read ✔️
  • Send GET Request for text/html only ✔️
  • Pull out relevant Div Element ✔️
  • Wrap resulting part in <html> so it registers properly ✔️
  • Extract table data (if there is any) to?
  • Convert HTML Table into Ascii using?
  • Replace tables in the HTML with Ascii tables?
  • Save HTML as String ✔️
  • Send to clipboard and paste to sheet as Unicode (this renders the HTML) ✔️

I've got a sheet full of calculations so I can figure out what width each column needs to be to keep it 100char wide, how many extra rows any wrapped text will need, even which cell has the single biggest word to apply a minimum col width if needed, what am I missing to get it all working smoothly together?

TL;DR:

How to I extract HTML tables from a web scrape, use that data to create ascii style tables, then replace the HTML tables with their ascii version, ready to drop into an Excel sheet?


r/vba 6d ago

Show & Tell [ACCESS] VBA diff tool

Upvotes

Hi r/vba,

Interestingly, if you password-protect a VBA project but not the database itself, only Access will ask for that password. But the module texts won't be encrypted, and you can extract them using the thirdparty library.

I recently updated my online database comparison tool and added Access support. You can compare VBA of forms, reports, and modules. You can also compare table definitions, queries, macros, and table data. And yes, if you don't have a password for the database but do have a password for the VBA project, you don't need it.

Everything works entirely in the browser. Uploaded files are only stored in the page's memory and never go to the server. Basically, after opening the page, you can disconnect from the internet and it will still work. Access is not required, works on Windows, Linux, and Mac. A side benefit is that you can open the A97 mdb format, which is not even supported by recent Office versions.

A huge thanks to the jetdb project and its predecessors. To get this all working, I had to make several fixes. They're all available in my fork, and if the author allows, they'll be merged into the main project; the first pull request is awaiting.

AI usage - intensive (for code, not for this post). The previous .NET UNO-platform-based version for SQLite was too heavy, and I wanted to rewrite it using something more compact for a long time. But I spent pretty much time on reviewing and testing the changes. To verify some of the fixes, I even had to find a Win98 image with Access 97 to ensure the fixes were valid for its mdb format. I haven't seen Clippy for about 25 years!

Link: https://ksdbmerge.tools/for-msaccess-online

I'd be happy if this will be useful for anyone.


r/vba 7d ago

Show & Tell vbaXray v2.2 - The FRX Enigma

Upvotes

vbaXray is a single VBA class module that extracts VBA source code straight out of Office files.

I posted about v1.0 a few months back, with an update a few weeks back outlining improved performance and file format support, and now the current version addresses that annoying elephant in the room - FRX files.

Now, just a short note to let you know that vbaXray now exports valid, importable FRX files alongside their corresponding FRM sibling files. Both files are required for importing Userforms into projects.

And for anyone with a burning desire to know what projects are referenced in a file, this information is now available too (except for Access files, at present).

Sub XrayDemo()   
  Dim xray As New clsVBAXray   
  If xray.LoadFromFile("C:\ShowMeTheCode\ThisIsYourWorkbookName.xlsm") Then       
    Debug.Print "Project: " & xray.ProjectName     
    Debug.Print "Modules: " & xray.ModuleCount     
    xray.ExportAll "C:\OutputCodeHere\ExtractedCode\"     
    xray.DebugDumpStorageTree   
  Else     
    Debug.Print "Load failed: " & xray.LastError   
  End If 
End Sub  

I've also applied various fixes to make exported modules/classes from Access files actually importable again.

The code, some basic documentation, and a (very simple) demo workbook are already on GitHub:

https://github.com/KallunWillock/vbaXray/


r/vba 7d ago

Show & Tell Proposed Feature: An "Effective Formatting Inspector" so we can stop writing VBA just to diagnose Word layout conflicts

Upvotes

Fellow automation nerds,

I just submitted a formal request to the Microsoft Feedback Portal for an observability/diagnostic layer in Word to expose the causal chain of formatting conflicts. If you've ever had to write a script just to find out why a document's layout is breaking, please check it out and upvote it: https://feedbackportal.microsoft.com/feedback/idea/355f0b90-6697-f111-9b47-7c1e52444ef6

Word lacks an inspector that shows the collective causal chain (Style → direct overrides → list-level formatting → tabs → resulting position).

Case in point: I recently spent time troubleshooting a 25-page legal document with a rogue 0.5" horizontal displacement. Margins and styles checked out. It turned out to be a messy combination of a direct paragraph override, multilevel lists, and 327 explicit 1.5" tab stops. I had to resort to a VBA routine to map out, identify, and clear the anomalous tabs because the native UI completely hides this interaction.

The proposed tool wouldn't alter the document model or break backward compatibility—it just exposes the rendering data Word already calculates.

Take a look and throw it an upvote if you'd like to see Microsoft actually build this!


r/vba 7d ago

Unsolved VBA Macro to Office Script - or point VBA to Sharepoint query

Upvotes

Our finance team currently have an ancient Excel file with a VBA macro that they use to get the contents of a folder and compare data with

Currently this points at our on-prem NAS and we'd like to move them away from that into Sharepoint.

So rather than pointing at

\\file-nas-01\finance\data

it points at

https:\\[sharepoint].finance.com\folder\folder

Is there a good resource to help convert this into an Office Script?

Or am I able to just reframe the full VBA into an office script and are there any guides to do so?

Some of the code from the VBA Macro below;

    ' setting the variables for the process
    Dim folder_path As String: folder_path = Cells.Find("Folder with files you want to count:").Offset(1, 0)
    Dim document_type As String: document_type = Cells.Find("What type of files do you want to check?").Offset(1, 0)
    Dim next_history_row As Long: next_history_row = Sheets("History of Counter").Range("A1048576").End(xlUp).Row + 1
    Dim total_count As Long
    Dim total_money As Double

    'getting the total count of the files and the money value of the files
    total_count = get_file_count(folder_path, document_type)
    total_money = get_money_from_files(folder_path, document_type)

    'Put the next row of data in the history to record outcomes of what folder was checked,
    '   for what type, by who and when
    Workbooks(ThisWorkbook.Name).Sheets("History of Counter").Range("A" & next_history_row) = folder_path
    Workbooks(ThisWorkbook.Name).Sheets("History of Counter").Range("B" & next_history_row) = document_type
    Workbooks(ThisWorkbook.Name).Sheets("History of Counter").Range("C" & next_history_row) = total_count
    Workbooks(ThisWorkbook.Name).Sheets("History of Counter").Range("D" & next_history_row) = total_money
    Workbooks(ThisWorkbook.Name).Sheets("History of Counter").Range("E" & next_history_row) = Date
    Workbooks(ThisWorkbook.Name).Sheets("History of Counter").Range("F" & next_history_row) = Environ("username")

r/vba 8d ago

Solved Outlook get raw E-Mail message in CFBF format

Upvotes

Is it posible to get a raw E-Mail message to repair/rescue the messages from Outlook without any processing from the Outlook side into Excel.

If I drag and drop the message into a directory I'll get the file without processing and I can read the message with Excel... . (Ole-header, fat, mini-Fat, difat, messages).

I need to take the messages from Outlook progratically ... i can't use message.saveas as Outlook modify the message with this command. If try to change the interface to element from Windows form 2.0 ... it can't futher work with the message.

Is it posible to use forwardAsAttachment and then extract the attachment?


r/vba 9d ago

Solved VBA to remove images from HTML Document

Upvotes

I'm pulling my hair out here wading through 10 year old StackOverflow posts and deploying all the google-fu I can muster, all to no avail so now I have to explain to strangers why I'm doing this daft project, first:

BLUF:

How do I remove images and other <div class> elements from an HTML Document? (ideas currently working around getElementByClassName or "Replace All between '<img ' and ' /> with "" " or stopping them entirely at the GET request).

THE PROJECT:

I'm a big fan of the SCP Foundation Wiki but I'm always losing track with what I've read out of several thousand articles so I set out to make a reading tracker in Excel which was so simple to start with, but there's new articles every day and old ones are changed, so it needs to be easily updatable, and a bit better to interact with than just a list and oh hello scope creep....

....and now I'm trying to make a "lite Reader" that will get the HTML of an article and strip it down to the bare bones, only the main page content, no images, no formatting other than bold/italic etc, and put that into an Excel spreadsheet. Inspired by the excellent Terminal Reader I found here which uses Rust to strip down the html into markdown, I've got something working to a point, here's the Frankenstein monstrosity I've pieced together from a dozen scraps of code so far:

Public Sub ExtractAndPaste()

  Dim data As Object
  Dim html As HTMLDocument
  Dim objData As DataObject
  Dim sHTML As String
  Dim obj As Object
  Dim elements

'------Get the HTML-----------------------------------------    
  Set html = New HTMLDocument

  With CreateObject("MSXML2.XMLHTTP")
    .Open "GET", "https://scp-wiki.wikidot.com/scp-5000", False
    .send
    html.body.innerHTML = .responseText
  End With
'----------------------------------------------------------- 

'------Remove Unwanted Elements (This bit doesnt work)------    
   With html
     elements = .getElementsByClassName("scp-image-block block-right")

     While elements = 0
       elements(0).ParentNode.RemoveChild (elements)
     Wend
   End With 
'-----------------------------------------------------------

'------Clear Destination Worksheet--------------------------   
  With ThisWorkbook.Worksheets("Sheet4")
    .Cells.ClearContents
    For Each obj In .Shapes
      obj.Delete
    Next
  End With
'-----------------------------------------------------------

'------Pull out Wanted Element------------------------------
  Set data = html.getElementById("page-content")
'-----------------------------------------------------------

'------Convert to Formatted Text---------------------------- 
  Application.EnableEvents = False

  With ThisWorkbook.Sheets("Sheet4")
    Set objData = New DataObject

    sHTML = data.innerHTML
    sHTML = "<html>" & sHTML & "</html>"

    objData.SetText sHTML
    objData.PutInClipboard

    .Range("C5").Select
    .PasteSpecial "Unicode Text"

  End With

  Application.EnableEvents = True
'-----------------------------------------------------------

End Sub

When this runs it will grab the HTML of the chosen article, the next step it skips over, I'll come back to that in a mo, clears everything from the destination worksheet (if the previous step worked then the obj.Delete would no longer be needed), takes the HTML and pulls out only the <div id="page-content"> turns it into a String so we can append <html> and </html> to either end of it so that it all registers as a block of html, which means when it gets put on the clipboard and then pasted into the worksheet as Unicode Text it renders the formatting and pastes it in line by line, cell by cell, which is exactly what I want, however.....

It's also rendering the images which I don't want (and tables are a mess, but one problem at a time), and this is the part I can't figure out:

If I use .getElementsById then that returns a single Node which can then be removed with something like this:

Set Node = html.getElementById("page-title")

    Node.parentNode.removeChild Node

But <img> isn't an ID, it's a Class Tag and using .getElementByClassTag returns (I believe) a NodeList so the above code doesn't work, plus it sits inside <div class="scp-image-block block-right"> which makes getting to it a bit trickier, probably easier to remove the whole class and everything in it so we would use .getElementsByClassName to get what we need but I just can't get it working.

If I run the code as is, leaving elements declared as a general variable, when we step through to elements = .getElementsByClassName..... and we mouse over elements it comes up as elements = "[object HTMLDivElement]", so I changed elements to be an HTMLDivElement, Set it, and now we get a Runtime Error 13: Type Mismatch.

I tried some other combinations of declaring elements as different things (object, IHTMLDivElement etc) and getElementByClassName/TagName and the furthest I got it to go was to the elements(0).ParentNode.RemoveChild (elements) line which came up with an Automation Error, probably because I have no idea how to get the syntax to work for a NodeList, as far as I can tell the list is numbered the same as other vba lists as in it starts at (0), so say we run the script and it finds 3 <div class="scp-image-block block-right"> blocks, they would go in the list as

(0) - Block 1
(1) - Block 2
(2) - Block 3

If we successfully (somehow) remove Block 1, the list refreshes and we now have

(0) - Block 2
(1) - Block 3

So the plan is to loop "Remove Node from position (0), if there is still something in position (0), repeat" and once they're all removed it can then go on for rendering.

As I mentioned way up in the beginning, I feel like we could achieve a similar result with a "Replace all Between" but it's a bit of a brute force approach that I'd rather leave for the little bits that miss the big clear out, I also feel like there's a way to restrict what comes through with the original GET request but I may be imagining things.

If you made it here, thank you for your patience and to mirror the BLUF, here's the-

TL;DR

How do I remove images and other <div> elements from an HTML Document?


r/vba 9d ago

Weekly Recap This Week's /r/VBA Recap for the week of August 22 - August 28, 2026

Upvotes

r/vba 10d ago

Unsolved VBA Macro automate to Internet Explorer

Upvotes

Is there a way for VBA Macro to dropdown the dropdown bar and select the specific choice?


r/vba 10d ago

Unsolved Macro to change font to last-used color [PowerPoint]?

Upvotes

Hello, I'm trying to create a macro to change the font of a selection in PowerPoint. But instead of changing the color to a set value, I'd like for it to be the most recently-used font color, as if I had pressed the Font Color button in the ribbon.

I'm not sure if there is a command that presses ribbon buttons in VBA or if it's more complex than that.

Any help would be appreciated, thank you!


r/vba 11d ago

Unsolved LETTERHEAD macro Word

Upvotes

Hi Everyone,

For months ive been trying to create a VBA code to apply our organization's letterhead on word. We use a custom Normal.dotm. I have been very close to implementing this but theres always a small area that doesnt work. The requirement is to have a Macro that applies the letterhead without making any chnages to the formatting of the normal.dotm and makes no chnages to the graphics design as well.

Any help is welcomed. Ive used AI and went on loops to a point where im lost. Thank you in advance


r/vba 12d ago

Solved VBA Embed PDFs in Excel causing corruption

Upvotes

Im trying to build a tool that lets you select a folder of PDFs and embed each one in a separate sheet in an Excel.

It works amazingly well except when you go to save the file Excel says it's corrupt and can't be saved/error saving. I've tried tweaking it so many times but nothing works. Even just 1 pdf embedded causes the corruption.

When I manually embed the PDF there is no issue.

Does anyone know a fix? Or is programmatically embedding PDFs just not possible?


r/vba 15d ago

Solved VBA Consignment Doc Pack Generation

Upvotes

I've been using free versions of various AI models to build an excel workbook that will allow a user to input information into only one tab, then the VBA will complete the packing list, commercial invoice, package markings and delivery note per consignment.

It will also generate the subfolders within the project filing system, name the folders in a certain layout I've set for it and then save each document as a PDF with layout I've set for it as well.

Should a pack need to be redone, I've also arranged that it generates only 1 "Old" folder within the consignment folder and move the old PDFs to that folder within a date & time stamped folder that it also generates.

The board of directors now wants this to go company wide and will assign a budget to me. However, I need to choose the best AI for this first.

I would appreciate feedback from the community on the best AI to use for this project and any feedback on the project itself is also welcome please.

The company does not want to integrate AI into the actual workbook as they are afraid our IP or a client's IP is accidently leaked.


r/vba 15d ago

Show & Tell Custom Excel Theme Management

Upvotes

Hello VBA friends!

I have created a tool to create and apply custom color themes to your workbooks. This is a modified version from the original I built for work. The original version is a little more advanced with each user having a favorites folder in their documents and the main file shared between all users across the network. We can all use each others created themes.

I hope this does not go against rule 7.
This is not AI generated, but rather uses an API key to send a prompt to Google Labs that will generate 12 colors. They will be returned in a specific template to create a theme based off an object or idea that you enter in a textbox.

Currently there are categories and tags that can be entered to filter the list of themes to choose from. I am looking for feedback and/or suggestions on further improvement.

Take a look if you have the time.
Thank you!

You can download it here
https://github.com/C-Johnson83/Workbook_Painter/releases/tag/v1.0.01

I do not see where I can upload an image


r/vba 15d ago

Waiting on OP Alternatives To Microslop

Upvotes

Does anyone have any suggestions as to alternative VBA development environments other than VBA in Microslop's Access and Excel applications?

I have a few applications written in MSAccess/VBA for our enterprise which I could ideally convert/rewrite in another application for 3 primary reasons:

- I am not reliant in other users installing/using MSAccess

- I'm not entirely happy with MS, their current projection, their constant bleating about removal of VBA from Excel and Access at some point and therefore putting any future development at risk, and

- Putting all my current business eggs in a single Microslop basket

Ideally I'd love to find a VBA clone/alternative not dissimilar to the old-skool VB6 development environment which allows a developer to create EXEs (though obv with a 'install pack' porting dependencies), has a decent GUI for the user, uses the power of API (I still need an ODBC connections to SharePoint lists though that's gonna disappear too if I get the chance) and allow me to interface with Access/PowerPoint as referencable objects.

Suggestions?


r/vba 16d ago

Weekly Recap This Week's /r/VBA Recap for the week of August 15 - August 21, 2026

Upvotes

r/vba 18d ago

Discussion A user reported “Out of memory” on a nearly empty workbook. The real bug was Excel’s language settings.

Upvotes

I maintain a fairly large Excel/VBA project, and a user recently reported this error while opening a workbook with only a few rows:

Error in RestoreWBSFormulaColumns: Out of memory

The obvious suspects were Excel 32-bit, workbook corruption, a memory leak, or some unexpectedly large table.

None of them made much sense. The workbook was almost empty.

The real problem was localization.

Some calculated-column formulas were being written in French through .FormulaLocal, using function names such as SI and OU, with semicolon separators.

That worked perfectly on my French installation of Excel.

On an English installation, those same strings were invalid because .FormulaLocal expects formulas in the user’s local Excel language.

The particularly unhelpful part was that Excel reported the failure as “Out of memory” rather than anything clearly related to formula syntax.

The fix was to move everything to invariant English formulas through .Formula, and to remove the remaining language-dependent formula comparisons from the codebase.

What I want to put the spotlight on the most was how valuable one real user feedback could be.

He was using Excel in an environment I could not reproduce locally, and he was actually considering building a similar tool himself before finding mine. His report exposed an assumption that had survived all of my own testing simply because I had only ever tested on French Excel.

That one message led not only to the localization fix, but also to a much wider stabilization pass that uncovered several unrelated bugs.

It was a good reminder that testing inside your own environment only proves that the software works inside your own environment.

What is the most useful or surprising user report you have received on a VBA project?

Did it reveal a bug or assumption you would probably never have found yourself?


r/vba 18d ago

Discussion Using Classes by instantiating in standard Module

Upvotes

Hey everyone

I am wondering why would anyone instantiate the class in a standard module instead if declaring directly in the place you want the class

What benefits this method have especially for composite use case

Like needing session class inside a permissions class inside form class

A second question how would you approach a situation close to mine