View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jive Jive is offline
external usenet poster
 
Posts: 34
Default insert vba code to new workbook

Hi

I have a large 5ish meg spreadsheet, into which project info is entered.
Once complete there is a function which opens a new workbook and then saves
it with the raw data in it, ie as a save file. which is much smaller.

I would like to add some code to the "Private Sub Workbook_Open()" section
of the save file so that if it is opened directly, and not through the main
tool as it is supposed to be, exports itself to the main tool.

I havent worked out the exact coding, although i know roughly what i need.

However, I need help on how to open a blank workbook and add the code to the
"Private Sub Workbook_Open()" section. I dont want to use a template if that
is possible.

Many Thanks