View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Flash in the Pan Flash in the Pan is offline
external usenet poster
 
Posts: 7
Default Programatically adding code to a worksheet

I've written a macro to add some controls (i.e. buttons) to a
worksheet (not form).

2 questions

1. How do I add the code for the controls, like 'Private Sub
CommandButton1_Click()', to the worksheet that contains the control
programatically.

2. does this code have to be attached to the sheet that contains the
controls?

Thanks