Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default test if a control has or doesnt have focus?

Is it possible for me to test if a control has or doesnt have focus?

Event handlers are called even when the associated event wasn't user
generated. for example, if a listbox is updated in another method


Sub listbox_click()

some code

End sub


Can I test to see if the user clicked or if another method called it by
testing for focus? For example:



Sub listbox_click()

if gotfocus(listbox) then some code

End sub


Reply
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
Calculate mean of test scores from rows of test answers RiotLoadTime Excel Discussion (Misc queries) 1 July 26th 06 05:14 PM
font size changes w/ control focus mark kubicki Excel Worksheet Functions 0 June 17th 05 06:00 PM
Embed command button from the control toolbox doesnt work guichre Excel Worksheet Functions 1 November 16th 04 02:28 AM
Embed command button from the control toolbox doesnt work Roland Excel Worksheet Functions 0 November 16th 04 02:20 AM
Taking focus off a Control Checkbox Don Wiss Excel Programming 1 November 11th 03 12:18 AM


All times are GMT +1. The time now is 06:34 PM.

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

About Us

"It's about Microsoft Excel"