View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
AndrewArmstrong AndrewArmstrong is offline
external usenet poster
 
Posts: 24
Default Adding a macro to all new workbooks

I have a master workbook that creates other workbooks via VBA. Each new
workbook has a forms toolbar button. I have assigned a macro to the
button using

Set btn = ActiveSheet.Buttons.aDD(460, 1, 100, 25)
btn.OnAction = "AddInterface"
btn.Characters.Text = "Add Interface"

This seems to reference back to the macro on the sheet that is creating
the workbook. I would like each new workbook to contain a module with
the VBA code I have written, called "AddInterface", that does not
require the master sheet. Any ideas?? Thanks in advance!