Text box help

  • Thread starter Thread starter Greg B...
  • Start date Start date
G

Greg B...

I want to make a splash screen with text box 1 showing the contents of cell
c 12 on my worksheet


How do I code this please

Thanks in advance

Greg
 
Create a userform, and add a textbox and this code

Private Sub UserForm_Activate()
TextBox1.Text = Worksheets("Sheet1").Range("C12").Value
Application.OnTime Now + TimeSerial(0, 0, 5), "CloseForm"
End Sub

and in a general code module add this

Sub CloseForm()
Unload UserForm1
End Sub

This will display the form for 5 seconds

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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