How to assign same code inside Option button code space ??
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. |
How to assign same code inside Option button code space ??
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. |
All times are GMT +1. The time now is 03:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com