Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing a subroutine attached to a command button on a sheet that
looks through all the other sheets in the worksheets() collection and, if applicable, runs the commandbutton1_click subroutine on each sheet. Unfortunately different sheets have different commandbutton1 code but the subroutine I'm writing needs to 'click' them all. I've made commandbutton1_click public on each sheet. No luck with worksheets(n).commandbutton1_click. Any suggestions how to do this? Thanks everyone! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Go by the codename
application.run worksheets(n).codename & ".commandbutton1_click" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Duncan" wrote in message ups.com... I am writing a subroutine attached to a command button on a sheet that looks through all the other sheets in the worksheets() collection and, if applicable, runs the commandbutton1_click subroutine on each sheet. Unfortunately different sheets have different commandbutton1 code but the subroutine I'm writing needs to 'click' them all. I've made commandbutton1_click public on each sheet. No luck with worksheets(n).commandbutton1_click. Any suggestions how to do this? Thanks everyone! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works great!
Bob Phillips wrote: Go by the codename application.run worksheets(n).codename & ".commandbutton1_click" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Duncan" wrote in message ups.com... I am writing a subroutine attached to a command button on a sheet that looks through all the other sheets in the worksheets() collection and, if applicable, runs the commandbutton1_click subroutine on each sheet. Unfortunately different sheets have different commandbutton1 code but the subroutine I'm writing needs to 'click' them all. I've made commandbutton1_click public on each sheet. No luck with worksheets(n).commandbutton1_click. Any suggestions how to do this? Thanks everyone! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a subroutine using variable subroutine name | Excel Discussion (Misc queries) | |||
Refer to worksheet | Excel Programming | |||
worksheet subroutine causes Compile error: Not found when on User | Excel Programming | |||
Worksheet Cell Range Name within VB Subroutine | Excel Discussion (Misc queries) | |||
How do I run a subroutine on a worksheet | Excel Programming |