Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I've to assign the same VB code to all of my 200 option buttons inside a sheet. Do i have to write it manually for all buttons??? thanks for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is one way:
Private Sub CommandButtonName_Click() 'Do something myMacro End Sub Sub myMacro() 'Do events, etc. End Sub Attach the Private Sub to the command button and put the macro you want to run in the general code module. When you click the button it does whaterver you had it there for plus it calls the myMacro from the general module. "furbiuzzu" wrote: Hi all, I've to assign the same VB code to all of my 200 option buttons inside a sheet. Do i have to write it manually for all buttons??? thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Option Button code not working | Excel Discussion (Misc queries) | |||
How to make a button VBA code reference other VBA code subroutines??? | Excel Programming | |||
option buttons run Click code when value is changed via VBA code | Excel Programming | |||
Code to tab from option button click | Excel Programming | |||
Assign code to button | Excel Programming |