ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save Workbook As .xlsx to Remove Macros? (https://www.excelbanter.com/excel-programming/421153-save-workbook-xlsx-remove-macros.html)

char507

Save Workbook As .xlsx to Remove Macros?
 
Hi everyone, reading posts on this board have been extremely helpful in
writing my macros. I've got a file running some macros to get up-to-date
information upon opening. The last step is to allow users to save a copy or
snapshot of this information their local drive, but to do that I need to
strip all the macros from the code so they are just left with the data that
was generated when they opened it.

My idea here was to use the BeforeSave event, supress alerts and save as a
..xlsx file (removing all macros from the workbook). However, I would also
like the user to still be able to select his or her desired save location.
I'm a little confused on the code to do this...can I set the save type (or at
least the default save type) to .xlsx and still let the user select the save
path?

Any help would be greatly appreciated.

Ron de Bruin

Save Workbook As .xlsx to Remove Macros?
 
Hi char507

See
http://www.rondebruin.nl/saveas.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"char507" wrote in message ...
Hi everyone, reading posts on this board have been extremely helpful in
writing my macros. I've got a file running some macros to get up-to-date
information upon opening. The last step is to allow users to save a copy or
snapshot of this information their local drive, but to do that I need to
strip all the macros from the code so they are just left with the data that
was generated when they opened it.

My idea here was to use the BeforeSave event, supress alerts and save as a
.xlsx file (removing all macros from the workbook). However, I would also
like the user to still be able to select his or her desired save location.
I'm a little confused on the code to do this...can I set the save type (or at
least the default save type) to .xlsx and still let the user select the save
path?

Any help would be greatly appreciated.


char507

Save Workbook As .xlsx to Remove Macros?
 
Thanks Ron.

Sorry I didn't reply sooner, I stumbled upon this link earlier and it fixed
me right up.


All times are GMT +1. The time now is 04:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com