Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Status of Focus

Hello!,

Is there a way to check the status of focus in a userform control?

some thing like :

if Textbox1.focus = true or if textbox1.setfocus = true ???

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Status of Focus

I think you have to find if the ActiveControl is the one you're interested
in.

Private Sub UserForm_Click()
Debug.Print ActiveControl.Name
End Sub


--
Jim
"Soniya" wrote in message
oups.com...
| Hello!,
|
| Is there a way to check the status of focus in a userform control?
|
| some thing like :
|
| if Textbox1.focus = true or if textbox1.setfocus = true ???
|
| Thanks
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Status of Focus

Thanks for your reply.

I got the point. Still my code does'nt work !!

What i am trying to do is:

I have two TextBoxes in my UserForm.

by cliking a SpinButton I want to increase and decrease the font size
based on which TextBox has the current focus.

If the user has clicked TextBox1 (the content is locked) SpinUp should
increase the font size by 1 and if the user has clicked on Textbox2
then spin up should increase the font size in TextBox 2

Thanks

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
reuest formula for auto update status & status date PERANISH Excel Worksheet Functions 5 June 2nd 08 04:26 PM
set focus tkaplan Excel Discussion (Misc queries) 3 September 27th 05 07:41 PM
Need a msg box that displays time status or loading status havocdragon Excel Programming 2 April 2nd 05 05:29 PM
RTD Getting The Focus James Dunkerley Excel Programming 1 December 2nd 04 06:57 PM
focus Art[_6_] Excel Programming 1 June 7th 04 05:53 PM


All times are GMT +1. The time now is 09:08 AM.

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

About Us

"It's about Microsoft Excel"