Michael,
Try this version
Dim endTime As Double
Private Sub UserForm_Activate()
TextBox1.Text = "Some value"
endTime= Now + TimeSerial(0, 0, 2)
Application.OnTime endTime , "clearTextbox1", schedule:=True
End Sub
as before, you need a procedure (actually two) in a standard module that
reacts to the OnTime
method
Sub clearTextbox1()
With UserForm1
.TextBox1.Text = ""
.TextBox2.Text = "Another value"
End With
endTime = Now + TimeSerial(0, 0, 1)
Application.OnTime endTime , "clearTextbox2", schedule:=True
End Sub
Sub clearTextbox2()
UserForm1.TextBox2.Text = ""
End Sub
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Michael_I " wrote in message
...
Hello Bob!
I like the way you explained the solution! I have been through the
code that you have provided along with the code on Chip's site. I am
still running into a problem. I can get both textboxes that I am
working with to display the random number and also the dataset and then
clear the text box. The problem that I am running into is that they
display at the same time. I need textbox1 to be displayed, then
textbox2. This has to happen without the use of another button (it
must run when the userform initializes).
Any suggestions how to make a pause, delete textbox1 the show textbox2
- while in the same module? I was thinking that I could just call the
ontime to create the pause, but it does not seem to be working.
Thanks,
Mike
---
Message posted from http://www.ExcelForum.com/