Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Text Box has the focus

i have a form with several text boxes on it. let's just say TextBox1 through
TextBox5. i have Label1, which i wish to display a short help message when
that textbox has the focus. the help statements are in range A1:A5. how can
i translate this message into VBA:
if TextBox1 has the focus then Label1.Caption = range("A1").Value

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Text Box has the focus

Hi Spencer

use the textbox1_Enter event e.g.

Private Sub TextBox1_Enter()
Label1.Caption = Range("A1").Value
End Sub

if you want to clear the caption put code also against the Textbox1_Exit()

Cheers
JulieD

"Spencer Hutton" wrote in message
...
i have a form with several text boxes on it. let's just say TextBox1
through
TextBox5. i have Label1, which i wish to display a short help message
when
that textbox has the focus. the help statements are in range A1:A5. how
can
i translate this message into VBA:
if TextBox1 has the focus then Label1.Caption = range("A1").Value

TIA



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
Paste function is disabled when a text box has the focus alanleecohen Excel Discussion (Misc queries) 0 January 25th 07 08:02 PM
Text Box Focus Tim Coddington Excel Programming 1 July 25th 04 04:27 AM
focus? Chrome[_3_] Excel Programming 3 May 13th 04 10:01 PM
Text Box Set Focus Issue John Flynn Excel Programming 1 September 6th 03 07:24 PM
Text Box on User Form Set Focus Issue John Flynn Excel Programming 0 September 6th 03 02:41 PM


All times are GMT +1. The time now is 08:10 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"