Editing and saving a worksheet in .xlam file
Editing and saving a worksheet in .xlam file
(OP)
I have created a macro intended to update a revision number every time it is run. For example, cell A1 contains a number, and every time the macro is run, the value in A1 increments by 1. This is the only information stored in the workbook, as the macro references and works in other workbooks. I would like to distribute it as a .xlam file, but am having trouble updating the number in the xlam file and saving it so that next time anyone runs the add-in, the newest revision number is used. I'm using thisworkbook.sheets(1).Range("A1") = thisworkbook.sheets(1).Range("A1") + 1
to increment the revision. Can you even update and save a worksheet in a .xlam file via the VB script? Thanks a ton!!!
to increment the revision. Can you even update and save a worksheet in a .xlam file via the VB script? Thanks a ton!!!





RE: Editing and saving a worksheet in .xlam file
Your latest revision information needs to reside in one place, and one place only - accessible to all.
No need to use a .xlam file. a regular .xls would do.
A .ini file would be simpler, once you get past the complicated part of using them in exel.
http