Automatically adding macro code to existing spreadsheets
Posted by Jon Gossard on May 22, 2000 1:43 PM
I have created a custom footer which includes the full path, filename and sheetname, etc. by using the Workbook_BeforePrint subroutine. All my new spreadsheets already contain the custom footer but I would like to update all of my existing spreadsheets with the macro code as well. Does anyone know how to add macro code to a spreadsheet without cutting and pasting it in?!? I'm trying to write something in VBScript that will open each spreadsheet, add the code, save the file and move on to the next file. I'm relatively new at Excel so thank you for any help you can give me!