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: 4
Default Can subroutines be called based on a commandbutton number?

I have a form which will display a list of people, next to which a command
button will appear. If there are 4 people then four cb's will appear etc
etc.

The code I want to run doesn't change except for the position in the list,
so I could have

Private Sub cb1_click
call mysubroutine(1)
End Sub

Private Sub cb2_click
call mysubroutine(2)
End Sub

Is there any way for me to code the equivalent of -

Private Sub cb(index)_click
call mysubroutine(index)
End Sub

Thanks in advance (Apologies if this is a double post, my news server is
playing silly beggars)

Jeff




 
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
Matching call data based on date, time and number called to give c Twiggy Excel Discussion (Misc queries) 1 February 22nd 10 09:26 PM
turn off subroutines NDBC Excel Discussion (Misc queries) 3 July 27th 09 01:23 PM
Are there any NON-Visual Basic solutions for inserting a picture based a derived or called filename? The Great Attractor Excel Worksheet Functions 7 May 27th 07 04:38 AM
Counting the number of times someone called in sick smskater Excel Discussion (Misc queries) 3 September 16th 05 11:10 PM
Run method for subroutines Scott Excel Programming 1 August 26th 03 04:46 PM


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

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

About Us

"It's about Microsoft Excel"