|
-
Aug 18th, 2000, 03:52 AM
#1
Thread Starter
Addicted Member
Hi,
Does anyone know how I can create an array of command buttons and then write code so that when a button is pressed an index value or some parameter is passed back to the procedure so that I know which button is pressed. I know it is a simple problem its just my head isn't functioning this morning !!
Thanks for any help
Steve
-
Aug 18th, 2000, 04:02 AM
#2
Lively Member
As you say it, iIt's simple.
1 - create a command buton
2 - rename it as you want
3 - copy it
4 - paste it
5 - answer yes at the question to make a control array
All the event associate with the button have now a paramater Index.
-
Aug 18th, 2000, 04:38 AM
#3
Thread Starter
Addicted Member
DOH !!! Thanks for that, Its just come back to me....
Cheers
-
Aug 18th, 2000, 06:11 AM
#4
Thread Starter
Addicted Member
Sorry, I require more info...
I totally agree using VB, but I am trying to create an array in VB running behind Excel. Unfortunately you can't just change the names to the same in VBA.
So my question is again... How do I "create" IN CODE an array to hold command buttons (I am not sure whether to define a control or object) which I can then write code such as
If my array is called Card_buttons
Private Sub Card_buttons_click(Index as Integer)
Sheet(Index).select
(or something similar)
End sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|