Save xlsb copy without macros

S Oberlander

Board Regular
Joined
Nov 25, 2020
Messages
147
Office Version
  1. 365
Platform
  1. Windows
I have this large xlsb file on the server that I need to protect from accidentally saving edits from users.
I've debated saving it as a template but I'm afraid the file is too heavy to store as a template.
I don't want to protect it against edits because I don't want it should be too complicated for the user to use...
If I use any workbook event handler then that will get saved when along with the new copy of the file created by the user creating a situation where the user must create a new copy for every edit.... (either opening as read only, or disabling the option to save)

So I'm wondering if I can somehow (thru workbook event handlers... lol) save a copy as an xlsb, but strip it of any macros before saving.
Any help or any other suggestions would be appreciated
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
The VBA project doesn't add that much overhead to an Excel file. Saving an XLSB will save any macros. Saving a .XLSX will strip the macros. Making the file READ ONLY on the server using your file explorer will prevent overwrite.

So, you want them to be able to overwrite the file, but get rid of the macros? You don't want them to have to save to a new file name?
 
Upvote 0
My overhead is not in vba.
The file has some six hundred thousand rows.
My idea would be to have a beforesave event that cancels the save, does save-as instead, and then the macro should erase itself as it has completed its job. I just don't know how to do something like have a macro erase itself (If it is at all possible).
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,772
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top