From: sarndt on 30 Mar 2010 20:30 I've created a worksheet that has a number of control toolbox objects on it. When the Initialize Events macro starts I create events for each object in the main module that works with a class module. During run time, I create new form objects on the worksheet. Now I want to create events for the new objects and add them to the events collection that I created when the Initialize Events macro ran. How can I code this so that the new events and old events will both work during run time? Thanks Steve
From: sarndt on 31 Mar 2010 11:04 The objects are being placed into cells depending on the value of the cells. The cells are used for objects in some cases, textual values in others, and blank in others. Steve "OssieMac" wrote: > Hi Steve, > > It looks to me like you are making life hard for yourself but perhaps there > is a good reason for adding event code and objects on the run. > > Is there any good reason why you can't create all of the objects and add the > code in the interactive mode and then just set the visible property to false > until you require them? Unless there is a reason why you can't do it that way > then the problems associated with creating them within your code are not > worth it. > > > -- > Regards, > > OssieMac > > > "sarndt" wrote: > > > I've created a worksheet that has a number of control toolbox objects on it. > > When the Initialize Events macro starts I create events for each object in > > the main module that works with a class module. > > > > During run time, I create new form objects on the worksheet. Now I want to > > create events for the new objects and add them to the events collection that > > I created when the Initialize Events macro ran. > > > > How can I code this so that the new events and old events will both work > > during run time? > > > > Thanks > > > > Steve
|
Pages: 1 Prev: Open a workbook and get data from it Next: Getting Sheet Name from the Code Name |