Text Box has the focus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top