View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_7_] Peter T[_7_] is offline
external usenet poster
 
Posts: 162
Default Which activeX control currently has the focus?


"Khuli" wrote in message
Hi Peter

Thanks for the suggestion - I figured there wasn't a 'real' way to do it
:(

What about creating a global variable, and in the GotFocus/LostFocus
events I could save/clear the name of the current control. Is that
reasonable?


That's virtually what the example does, adds or clears the name at module
level in the sheet "class" module. If you prefer it fully global declare
the variable in a normal module, say

Public gsActiveAX As String

FWIW you could save/destroy an object reference, but for something like this
I'd prefer to store the name and recreate the reference with the name.

Peter T