LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
have toggle buttons but everytime print preview buttons move TinSandhu Excel Discussion (Misc queries) 1 October 11th 06 02:57 PM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
arrays - module to module mike Excel Programming 3 February 25th 04 08:56 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 11:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"