title: VBScript to Write a Macro within an Excel file
body: <p>Is it possible for the VBScript to write a Macro within the excel file when it is generated that would be able to run whenever the file is opened?</p>
  
  <p>Ive got a VBScript to auto generate an excel file and some data within it, this runs once and generates the file with all the data/sorts etc.</p>
  
  <p>What I need is to have some interactivity that would normally be run with a macro whilst the program is running and someone views the data, problem here being as it is an auto generated file, no macros are saved.</p>
  
  <p>If so how would this be implemented, how can a macro to be run later be written in the vbscript?</p>