Run multiple command buttons

jrisebo

Active Member
Joined
Mar 15, 2011
Messages
311
Office Version
  1. 365
Platform
  1. Windows
I have 13 buttons in a spreadsheet that sort data by color. This is to sort our data for each user. So each button is the initials of user. I want it to run the command button of the user that opens it. So, I have figured out how to get the user name, and then using that to assign a cell with the users initials. What I cant figure out is how to program it to run when open.

So in cell A1 I have users initials "AAA". How do I get the spreadsheet to run command button AAA when that user opens it, or run command button BBB when user BBB opens it, and so fourth. All the command buttons are named per the persons initials.

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I think I figured it out brute force...

VBA Code:
Select Case ActiveCell.Text
Case Is = "AAA"
Call AAA_Click
End Select
Select Case ActiveCell.Text
Case Is = "BBB"
Call BBB_Click
End Select

and so on. Seems to work.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,269
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top