macros and vba
6576 TopicsExcel can still use legacy “Move and Size with Cells” checkboxes — but can no longer create them
Excel Can Still Use “Move and Size with Cells” Form Checkboxes — But It Can No Longer Create Them A reproducible Excel compatibility regression hiding inside legacy Form Controls For years, I have used Excel workbooks containing hundreds of Form Control checkboxes attached to product rows. These checkboxes behaved exactly as you would expect: - change the row height, and the checkbox stays inside that row; - filter the worksheet, and the checkbox disappears together with its product; - remove the filter, and the checkbox returns to the correct row; - no overlapping controls; - no “click one checkbox, activate another” behaviour. Recently, while rebuilding one of these workbooks in Excel 2024 LTSC, I discovered something very strange. The old checkboxes still work perfectly. But if I delete one and recreate it — even using the same VBA code that originally created the controls — Excel creates a different kind of placement behaviour. After a full day of controlled testing, XML inspection and A/B workbook comparison, the problem became clear: Excel can still read, display, save and execute legacy Form Control checkboxes using true “Move and size with cells” behaviour — but current Excel cannot recreate that same state for a newly created Form Control checkbox through the normal UI or VBA object model. That is not just inconvenient. For existing business workbooks, it is a serious backward-compatibility problem. The simple VBA code that used to work The original controls were created with ordinary Excel VBA: Set myCBX = wks.CheckBoxes.Add( _ Top:=cell.Top, _ Left:=cell.Left, _ Width:=cell.Width, _ Height:=cell.Height) Nothing exotic. No custom event engine. No ActiveX. No external add-in. Just a standard Excel Form Control checkbox positioned exactly over a cell. The workbook contains roughly 1,000 of these controls. The old ones still behave correctly today. The problem starts only after deleting them and creating new ones. What changes? In the Excel UI, the difference is immediately visible. For an original legacy checkbox: Format Control → Properties shows: Move and size with cells The option is selected, although it is greyed out. For a newly created checkbox in current Excel: Move but don’t size with cells is selected instead. That already suggests something changed internally. But the real evidence is inside the .xlsm package. The OOXML tells the story I created two controlled test workbooks: Workbook A Original legacy Form Control checkboxes that behave correctly. Workbook B The same workbook, but the checkboxes were deleted and recreated in current Excel using the original VBA logic. The internal OOXML differs. The working legacy controls contain placement information equivalent to: moveWithCells="1" sizeWithCells="1" and use genuine two-cell anchoring. The newly generated controls are instead stored using one-cell-style placement semantics, including: <xdr:twoCellAnchor editAs="oneCell"> The important part is not merely the XML syntax. The resulting behaviour is observably different. With the legacy control, both ends of the object are anchored to the worksheet grid. With the newly created control, Excel effectively preserves the control size while cells move underneath it. That distinction becomes disastrous when rows are resized, hidden or filtered. Why filtering exposes the problem Imagine a checkbox sitting on row 50. With the legacy behaviour: Checkbox ↔ Row 50 boundaries When row 50 changes size, the checkbox changes with it. If row 50 is filtered out, the control disappears with the row. When the row becomes visible again, the control is still exactly where it belongs. With the newly generated control, its dimensions are not tied to both cell boundaries in the same way. After repeated resizing and filtering, controls can begin to overlap. That leads to one of the worst possible spreadsheet UI failures: You click the checkbox you can see, but another checkbox receives the click. For a workbook containing hundreds or thousands of rows, this makes the controls unreliable. “Just use .Placement = xlMoveAndSize” That was the obvious first solution. Excel VBA defines: xlMoveAndSize as the placement mode where an object moves and resizes with cells. So I tested: myCBX.Placement = xlMoveAndSize and: myCBX.Placement = 1 I also tested placement through the corresponding Shape: ws.Shapes(myCBX.Name).Placement = xlMoveAndSize And through a ShapeRange. And through DrawingObjects. And even the commonly suggested workaround: Group controls → set Group.Placement = xlMoveAndSize → Ungroup None of these recreated the original internal state in Excel 2024 LTSC. The workbook continued to serialize the new controls differently. This matches long-standing Microsoft guidance that Form Control checkboxes do not normally support “Move and size with cells” as an editable option, while ActiveX checkboxes do. And yet — this is the important part — existing legacy Form Control checkboxes in real workbooks can still possess and use that state. The most revealing experiment I then modified the OOXML manually. I took the newly generated workbook and patched the checkbox placement metadata to match the working legacy controls: moveWithCells="1" sizeWithCells="1" with proper two-cell anchoring and without the one-cell override. Then I reopened the workbook in Excel 2024 LTSC. And it worked. Immediately. No custom VBA reposition engine. No ActiveX. No workaround running continuously. The same Excel installation that would not create this state through VBA had absolutely no problem: - reading it, - displaying it, - saving it, - resizing the controls with rows, - and filtering them correctly. That is the key finding. The Excel rendering and file engines still fully understand this checkbox state. The missing part is the supported creation path. So is this an unsupported feature or a compatibility regression? Microsoft has historically documented Form Control checkboxes as not supporting “Move and size with cells” in the normal UI. That makes the situation unusual. The issue is not simply: “Excel removed a documented checkbox feature.” The stronger and more accurate statement is: Excel supports a legacy Form Control state in existing workbooks, continues to execute it correctly, but no longer provides an ordinary supported mechanism to reproduce that same state for a replacement control. For users maintaining long-lived Excel systems, the difference is academic. If an old control is accidentally deleted, replacing it with an apparently identical Form Control changes the behaviour of the workbook. That is a backward-compatibility problem. Why not switch to ActiveX? ActiveX checkboxes support richer placement behaviour. But that creates another problem. Microsoft now disables ActiveX controls by default in Microsoft 365 and Office 2024 for security reasons. When ActiveX is disabled, users cannot create new ActiveX objects or interact with existing ones. So the official alternatives are hardly attractive: Legacy Form Controls Lightweight and reliable — but cannot reproduce this legacy placement state normally. ActiveX Supports more control behaviour — but is now a legacy security-sensitive technology disabled by default in current Office. New in-cell checkboxes Architecturally much better — because the checkbox is part of the cell and represents TRUE/FALSE. But Microsoft’s own documentation currently lists the feature for: - Excel for Microsoft 365 - Excel for Microsoft 365 for Mac not Excel 2024 LTSC. That leaves perpetual Office users in an uncomfortable middle ground. This is where the product story becomes difficult to defend I am not claiming that Microsoft intentionally removed this behaviour in order to sell subscriptions. There is no evidence for that claim. But the resulting user experience is still hard to justify: 1. Excel can execute the legacy checkbox behaviour. 2. Excel can preserve it. 3. Excel can save it. 4. Excel accepts a manually patched workbook containing it. 5. Excel’s current object model does not provide a reliable way to recreate it. 6. The modern replacement — native in-cell checkboxes — is documented for Microsoft 365 rather than Excel 2024 LTSC. 7. The other legacy alternative, ActiveX, is now disabled by default for security reasons. For users maintaining mature Excel applications, this is a poor migration path. Why this matters beyond checkboxes This is not really a story about one checkbox property. It is about the contract users expect from long-lived productivity software. Excel workbooks are often not disposable documents. They can be: - product-management systems, - pricing tools, - engineering calculators, - operational forms, - purchasing systems, - inventory tools, - reporting applications, - or business processes maintained for ten or twenty years. When Excel continues to support the execution of an old document feature but silently prevents users from recreating an equivalent object, maintaining those systems becomes unnecessarily difficult. Backward compatibility should mean more than: “The file still opens.” It should also mean: “A user can maintain the workbook without reverse-engineering its OOXML package.” What Microsoft could do There are several reasonable fixes. Option 1 — Restore proper placement support Allow: CheckBox.Placement = xlMoveAndSize to generate the same placement state that Excel already understands for legacy controls. Option 2 — Expose the existing capability If the engine already supports it, expose “Move and size with cells” again for Form Control checkboxes. Option 3 — Provide a migration path Make the new in-cell checkbox functionality available to perpetual Excel releases as well, or provide an official conversion tool from legacy Form Controls to cell checkboxes. Option 4 — At minimum, document the limitation If this legacy state is intentionally read-only for compatibility, document it clearly. Currently, a user can spend hours debugging VBA without realizing that two visually identical Form Control checkboxes can have fundamentally different internal placement semantics. A workaround exists — but users should not need it The workaround I eventually used was to modify the .xlsm OOXML package so that newly generated controls use the same anchor metadata as the working legacy controls. That solved the problem immediately. But manually patching Office XML should not be necessary to restore behaviour that Excel itself already supports. It is a useful proof of concept. It is not an acceptable product-level solution. The reproducible evidence I have retained minimal A/B test workbooks demonstrating the problem: OLD Original Form Control checkboxes with correct legacy placement. NEW The same workbook after deleting and recreating the controls. The differences can be reproduced and inspected directly in the workbook OOXML. I would be happy to provide the files to Microsoft Excel engineering. Final thought Excel’s reputation was built partly on extraordinary backward compatibility. That is why companies still trust .xls and .xlsx files created years — sometimes decades — ago. This case shows an uncomfortable edge of that compatibility: Excel remembers how to use an old feature, but appears to have forgotten how to create it. When the workaround is to unzip an .xlsm, manually alter OOXML placement records, rebuild the package and reopen it in Excel — and Excel then works perfectly — it is difficult to argue that the capability itself is gone. The engine still knows how. The user simply no longer has a supported button or VBA path to ask for it. Microsoft, please give that capability back — or provide a proper migration path. Sources Microsoft documentation for native cell-based checkboxes: https://support.microsoft.com/en-us/excel/using-check-boxes-in-excel Microsoft-hosted discussion on Form Control checkbox limitations: https://learn.microsoft.com/en-us/answers/questions/4813119/is-there-a-way-to-assign-a-checkbox-to-a-cell Microsoft documentation on ActiveX controls being disabled by default: https://support.microsoft.com/en-us/office/vba/activex-controls-are-disabled-by-default-in-microsoft-365-and-office-202453Views0likes2CommentsSecurity risk - Microsoft has blocked macros
Hello. I have used 3 different macro spreadsheets from a developer through upwork for over a year with no problems. Last week I can no longer open the files. It comes up with a pick security risk - Microsoft has blocked macros from running because the source of this file is untrusted. I deleted a recent Microsoft update which I think caused the problem. I then redownloaded the files from upwork and was able to tick the unblock box through preferences. I was then able to use the files. Today however the warning has come up again and I can no longer use the files. I need to be able to use them for my work ASAP. Please help me.76Views0likes1CommentEnabling Office 2021 Excel Macros on a Mac
I just installed Office Home & Student on my Mac. An existing worksheet macro will not run. Upon opening the worksheet, I was prompted, as with the previous Excel version, to enable or disable the worksheet macros. The enable button doesn't seem to work as in the past. The new version of Office Excel for Macs is 16.552.4KViews0likes4CommentsMacro buttons not working
Hi, when I try to run a macro using its buttons, the buttons do not respond, animate, or function. Often a box will hover above the button containing its text, and when I am able to click on the box the macro runs; however, the buttons themselves are completely non-responsive. I can run macros successfully from the quickaccess toolbar.189KViews0likes20CommentsVBE The XLSM file can't save macros
Two computers: On my personal computer, the VBE module shows 'no open projects,' most of the buttons are greyed out, and if I try to click any non-greyed button, it gives an 'error in loading DLL.' On my work computer, the issue is: after creating a new XLSX document and saving it as an XLSM file, it opens fine; however, once I insert a Macro, it shows that the file is corrupted, and repairing it deletes my macro. I’ve tried reinstalling, adding trusted folders, modifying the registry, and rolling back to version 2607, but nothing worked. The personal computer is set to the US region and I downloaded the English version of 365, while the work computer is set to CN and I downloaded the Simplified Chinese version of 365. Also, the USER folder on my personal computer was moved to the D drive. I contacted Microsoft support, and the staff suggested I post in this community .154Views0likes0CommentsGLSU Excel add-in fails to load after Office update from Version 2607 to 2608
Our Excel add-in, Process Runner GLSU , fails to load after Microsoft Office updates from Version 2607 to Version 2608. This started August 17, 2026 and is actively growing in scope. Error messages: Excel: Cannot run the macro 'onLoad' VBA: System Error &H80004005 (-2147467259). Unspecified error VBA: Compile error in hidden module: ThisWorkbook Has anyone encountered similar issue with their own custom add-on. If yes, any pointers to fix it. We are seeking help on priority. Thanks, Vrushali Pawale, Sr. Manager, Insightsoftware.831Views0likes1CommentVBA Code stops
Not sure what is going on... this was working and now all the sudden the code stops part way through. Here is the current code (linked to a button) Private Sub CommandButton2_Click() Dim cofCom As Object Set cofCom = Application.COMAddIns("SapExcelAddIn").Object Dim api As Object Set api = cofCom.GetPlugin("com.sap.epm.FPMXLClient") api.RefreshActiveWorkbook Application.ScreenUpdating = False ActiveWorkbook.Sheets("Spend Detail").Activate Sheet14.CommandButton2_Click Sheet14.CommandButton1_Click ActiveWorkbook.Sheets("Spend Detail 1").Activate Sheet21.CommandButton4_Click Sheet21.CommandButton3_Click ActiveWorkbook.Sheets("Spend Detail 2").Activate Sheet22.CommandButton6_Click Sheet22.CommandButton5_Click ActiveWorkbook.Sheets("Spend Detail 3").Activate Sheet23.CommandButton8_Click Sheet23.CommandButton7_Click ActiveWorkbook.Sheets("Spend Detail 4").Activate Sheet24.CommandButton10_Click Sheet24.CommandButton9_Click ActiveWorkbook.Sheets("Spend Detail 5").Activate Sheet25.CommandButton12_Click Sheet25.CommandButton11_Click ActiveWorkbook.Sheets("Spend Detail 6").Activate Sheet27.CommandButton14_Click Sheet27.CommandButton13_Click ActiveWorkbook.Sheets("Finance Input Sheet").Activate Application.ScreenUpdating = True End Sub The problem is that all tabs update for the refresh but for some reason, going to each sheet and clicking the buttons is not occurring now. It is essentially stopping at line 6 and I have tried removing the screenupdating false and true and that did not make any difference. Just like for some reason the code stops and it was working a week ago. Any suggestions?738Views0likes4CommentsExcel repair strips all formulas from large .xlsm after March 2026 security update (KB5002849)
Hi everyone, I'm a master's student at Karolinska Institutet in Stockholm. My thesis is a health economic cost-effectiveness model built entirely in Excel — a gender-neutral static Markov cohort model with 34 worksheets. The file has become completely unusable after what I believe is the March 2026 security update, and I'm running out of options. The file: - .xlsm, ~46.5 MB compressed, ~370 MB uncompressed XML - 34 worksheets, four of which are 73–92 MB each (Markov trace sheets) - ~65,000 formulas, ~33,500 shared formulas - Heavy use of LET, LAMBDA, XLOOKUP, XMATCH, CHOOSECOLS, TAKE, MAP, SWITCH - 771 defined names including ~147 hidden _xlpm.* LET/LAMBDA variable placeholders - Stored on OneDrive via KI SharePoint, 34,000+ AutoSave revisions - Contains VBA (vbaProject.bin) The problem: Every time I open the file — on Excel for Mac or Excel Online — the repair engine triggers and strips ALL formulas from every sheet, replacing them with cached values. The file shrinks from ~46.5 MB to ~26 MB. Clicking "No" on the repair dialog just closes the file. There is no way to bypass the repair. What I've verified: - Extracted the .xlsm as a ZIP and confirmed all formulas (<f> tags) are fully intact in the raw XML - Libr€Office Calc can read the formulas but cannot execute them (Err:508 — no LET/LAMBDA support) - Removed 158 broken named ranges (#REF! and #NAME? entries) from workbook.xml and rebuilt the archive — repair engine still strips all formulas - The issue reproduces on every OneDrive version history copy (up until I largely used LET formulas in my sheets - but there is still 1,5months of changes lost) - The issue reproduces on both Excel for Mac and Excel Online Suspected cause: The March 10, 2026 security update (KB5002849) patched CVE-2026-26108, a heap overflow in Excel's file parsing during loading. The same patch was applied to Office Online Server (KB5002846). I believe the tightened parsing now rejects or flags my file's large XML structures as potentially malicious, triggering the repair engine to strip all formulas. This is consistent with: - The known _xlfn. namespace bug on Excel for Mac (reported by multiple users on Microsoft Q&A since late 2024) - The timing - the file was working before this update flawlessly up until March 16th - The fact that Excel Online is also affected (same server-side patch) My questions to the community: 1. Has anyone else experienced formula stripping on large workbooks after the March 2026 update? 2. Is there a way to bypass the repair engine on Mac, or roll back the specific security patch without downgrading all of Office? 3. Would opening this file on Windows Excel (pre-patch or current) preserve the formulas? If anyone with a Windows PC would be willing to try opening and re-saving this file, I would be incredibly grateful. 4. Is there now effectively a size/complexity ceiling for Excel workbooks that makes models like this unviable? If so - should I be migrating this to another environment (R, Python, etc.) going forward? This file represents six months of thesis work. The formulas are all there in the XML. I just need Excel to stop destroying them on open. Any help, pointers, or similar experiences would be hugely appreciated. Thank you, Florian Boschek1.5KViews0likes6CommentsHow to move a cell value using an RTD formula (pulling in live updating data) when it changes?
Hi, I am using Interactive Brokers TWS trading platform and they supply a demo excel file that has RTD formulas to pull in a list of available live data trading prices such as Bid, Ask, Last, etc. The RTD connection does not allow you to pull in historical data for the trading prices mentioned above. What I am want to do is the following, if possible: The Last price traded for the MES Futures contract is pulled into cell F3 by using the following formula: I am currently connected to the TWS trading platform and the value in cell F3 is 4761.25 As soon as the markets reopen this value will change continuously. I want to be able to capture the price of 4671.25 that is pulled into cell F3 and move it down by one cell as it changes - for whatever number of cells I decide to capture. For example, if I decide to capture the Last 20 prices, then I want to populate the range F3 to F22. Once I can move the changing values into the cells below, I can then use conditional formatting to change the cell colors based on the criteria I use, which is my objective of the exercise. Thank You.1.5KViews0likes2Comments