Replace Excel VBA macros without losing the buying rules
The Monday reorder button has stopped working and the buyer is rebuilding supplier orders by hand. To replace Excel VBA macros, document the inputs and buying rules, choose a maintained home for the work and compare its drafts with saved outputs. Name an owner and keep supplier orders subject to the buyer's approval.
Struan · Updated
Write down what the macro does
For the Monday reorder, sit with the buyer and trace a product from the sales export to its supplier order. Write down what the program reads, what it changes and what the buyer checks. That gives whoever repairs or replaces it a description of the job they must preserve.
Pay particular attention to supplier minimum orders. A quantity that looks right against sales alone still needs checking against the buying rule. Ask the buyer where they make manual adjustments and why. Keep those explanations with the workbook so the replacement includes the work happening outside the button.
You'll also want examples of an ordinary order and an awkward one. Saved exports, finished purchase orders and the buyer's corrections give you something concrete to test. If nobody knows why a rule exists, mark it as unresolved and ask the person responsible for buying to decide.
Why old macros are a risk
The distributor's immediate problem is that nobody owns the knowledge behind Monday ordering. That makes even a small fault hard to diagnose. Security adds another reason to handle the workbook carefully: a macro runs code, so enabling an unfamiliar file lets that code run on your computer.
- 01Finance controller writes the macro
- 02Buying team relies on it
- 03Controller leaves the business
- 04Button fails after an Office update
- 05Buyer rebuilds orders by hand
Keep security settings in place and ask your IT provider to inspect the file's origin, any warning and the error details. A blocked download and a broken buying rule need different fixes. Saving the evidence helps them investigate without asking the buyer to keep trying changes on the live ordering workbook.
Choose a safer home for the work
The Monday orders have three possible homes: a maintained script, an automation in the system holding the sales data, or an AI drafting job with buyer approval. Choose around the work your buyer actually does and who will maintain it after the first successful run.
Choose this when
- Maintained script for clear rules with a named owner
- Existing system automation when the sales data already lives there
- AI drafts when a buyer checks each order
Avoid these shortcuts
- Copying the unexplained macro into another workbook
- Switching macro security off
- Replacing the button without naming an owner
A script suits repeatable calculations with clear inputs. Existing system automation suits an ordering process already recorded there. AI drafting suits work that includes reading notes and preparing an order for review. For this distributor, supplier minimums still need explicit rules whichever route you choose.
Office Scripts is a Microsoft option to assess if the buyer's work stays in Excel. Ask whoever maintains your systems to check whether it covers this particular macro. You still need a written buying process and someone responsible when the sales export changes. If you're weighing AI for the Monday orders, here's when it fits.
A good fit if
- AI drafts have clear source records
- The buyer can check quantities and supplier rules
- Unclear items can wait for a decision
Probably not yet if
- Supplier minimums are still unexplained
- Nobody can review the draft orders
- Orders must be sent without checking
If the whole workbook has become hard to maintain, review where the buying records belong before choosing how to automate them.
Run old and new side by side
The buyer's saved orders let you test the replacement even while the old macro is broken. Use last month's sales exports and compare the new drafts with the purchase orders the buyer accepted. If the old macro is restored safely, run both on the same records without sending duplicate orders.
A difference on minimum order needs an explanation before switching. The head buyer checks the rule, the export and any manual correction to the old order. Record the decision and repeat the comparison after the fix. Agreement with an old output is useful evidence, but the buyer must also confirm that output was right.
Agree who maintains the replacement after launch
For an AI route, we help document the job, connect AI to the records it needs and set it up to prepare orders for approval. We train the buyers on the new set-up first, then keep it in step with your business. Bring the broken reorder workbook to a sense-check call with Struan, together with a saved order your buyer trusts.
Questions and answers
What can replace Excel VBA macros?
Three routes work: a maintained script, automation in your existing system, or AI preparing drafts for approval. Start with the macro's inputs, rules and outputs. A fixed calculation needs a different replacement from work that involves interpreting supplier notes. Give whichever route you choose a named owner and written instructions.
Why have my Excel macros stopped working?
The usual suspects are a security setting, a changed input file or a fault in the code. An update just before the failure is a clue worth following. Keep the exact workbook, input file and warning for your IT provider. Leave macro security enabled while they establish what stopped the job.
Can AI rewrite or replace a VBA macro?
AI can help explain code or prepare a replacement, but generated code still needs review and testing by someone able to maintain it. For the buying job, compare quantities, supplier minimums and complete orders with known examples. The head buyer should approve the result before any order reaches a supplier.
Sources
Running a business on spreadsheets: when it stops working
Running a business on spreadsheets gets harder when copies multiply.
- Sector guideJob costing spreadsheets for construction: when to move onUsing a job costing spreadsheet for construction?
- GuideOutgrown your spreadsheet? Choose what comes nextKeep the parts of Excel that work and fix the shared work that causes trouble.
- GuideSpreadsheet risks: the errors that cost small firms moneySpreadsheet risks hide in missed rows, overwritten formulas and old rates.
- GuideExcel version control: end the spreadsheet copy chaosExcel version control starts with one live workbook.
- ComparisonExcel vs database: which does your data need?Excel vs database: choose between a calculation workbook and shared records.
- ComparisonSpreadsheet vs CRM: give client follow-ups a homeSpreadsheet vs CRM for a small business: compare reminders, handovers and client history, then plan a move that keeps useful notes together.
The Monday button that stopped working
Ready to put the advice to work? Tell us where your week gets stuck. We’ll show you how we’d set AI up to help and keep it in step with your business.