Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Buttons in 1 module?
Hello, I have a workbook with 15 sheets. Each sheet has the same 5 commandbuttons: cb1 to cb 50. Each cb does the same thing as the cb o the next sheet (insert row on the active sheet in a given range). Right now I have to set a click-event for each cb, that's 50x1 click-events! Although the click-events call a module I still have al lot of cod that slows the program down. Example: Private Sub CBregel1_Click() Call nieuweregel1 End Sub Private Sub CBregel2_Click() Call nieuweregel2 End Sub And so on... And on the next sheet the same. Is there a way to put the click-event in a module or class-module s that I don't have to write this code on each sheet? Any help welcome -- jowan ----------------------------------------------------------------------- jowanr's Profile: http://www.excelforum.com/member.php...fo&userid=1688 View this thread: http://www.excelforum.com/showthread.php?threadid=32060 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CLASS MODULE & SIMPLE MODULE | Excel Discussion (Misc queries) | |||
have toggle buttons but everytime print preview buttons move | Excel Discussion (Misc queries) | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) | |||
arrays - module to module | Excel Programming | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |