rjbinney
Active Member
- Joined
- Dec 20, 2010
- Messages
- 294
- Office Version
- 365
- Platform
- Windows
I have a big honking spreadsheet, with lots of INDEX and LOOKUP formulas and one big macro.
I need to access it on my mobile - which doesn't tolerate the macros or formulas.
Many years ago - with the help of folks on this board - I created that macro, which:
Now I am getting a run-time 1004 error, and the debugger highlights that line and says "VB projects and XLM Sheets cannot be saved in a macro-free workbook."
As far as I can tell, I've made no changes to the structure of the file or the macro. (I've compared to archived copies). I presume(d) that by saving it as XLSX it just disabled or stripped the macros.
My guess is I need to add a line in the macro that removes macros? That feels like it creates some kind of Morton-salt-girl recursiveness (i.e., how can you have a macro remove macros from a file that's running the macro that tells it to remove a macro...).
My macro settings are at "Disable VBA macros with notification" - and I believe they have been for a long time. In an attempt to "fix" this challenge, I ticked the "Trust access to the VBA project object model" box.
I am open and happy to any elegant solution!
Incidentally, the last time this macro ran correctly was about six weeks ago - the same day I added XL2BB! I have since removed it, on the remote chance there's a connection, but the issue persists).
I need to access it on my mobile - which doesn't tolerate the macros or formulas.
Many years ago - with the help of folks on this board - I created that macro, which:
- Saves a copy of the Master
- Re-sorts the data
- Strips the formulas
VBA Code:Cells.Select Range("b1").Activate Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False
- Removes the Macro's Button
Code:ActiveSheet.Buttons.Delete
- Then saves as a "usable" worksheet... And that's where trouble has started
Now I am getting a run-time 1004 error, and the debugger highlights that line and says "VB projects and XLM Sheets cannot be saved in a macro-free workbook."
As far as I can tell, I've made no changes to the structure of the file or the macro. (I've compared to archived copies). I presume(d) that by saving it as XLSX it just disabled or stripped the macros.
My guess is I need to add a line in the macro that removes macros? That feels like it creates some kind of Morton-salt-girl recursiveness (i.e., how can you have a macro remove macros from a file that's running the macro that tells it to remove a macro...).
My macro settings are at "Disable VBA macros with notification" - and I believe they have been for a long time. In an attempt to "fix" this challenge, I ticked the "Trust access to the VBA project object model" box.
I am open and happy to any elegant solution!
Incidentally, the last time this macro ran correctly was about six weeks ago - the same day I added XL2BB! I have since removed it, on the remote chance there's a connection, but the issue persists).