CommandButton focus

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
9,806
Office Version
  1. 2016
Platform
  1. Windows
AFAIK, there isn't a Property similar to that of a UserForm ActiveControl but for controls embeeded on worksheets ?

I am asking because I have several embeeded ActiveX commandbuttons in a worksheet and would like to know which one has the focus.

Any thoughts?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Not as far as I know ( someone else may know ) ... but, ( you're gonna hate this ) you could code the GotFocus event for each one to update a flag as to which one was the last to get the focus. Just an idea ... I know that you know a lot about such things and may have already discarded that idea, but I thought I'd say so just in case.
 
Upvote 0
Thanks Glenn for the reply.

That sounds good for what I am doing and ,to be honest, this simple solution never occured to me .
 
Upvote 0
I'm so glad to have been of some help to you. I always enjoy your threads, and have a learnt a lot from you.
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

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