golf4
08-31-2004, 08:13 PM
Hi, everyone -
I'm not real sure this is possible, but I figured you guys would know.
I am currently using the code below using two (2) labels within my splash screen to show the current date and time. What I'm wondering is whether there is a way to construct an IF formula using Label1 in the formula. For example, ...... IF Label1< 10/1/2004, play a specific wav file; IF Label1> 10/1/2004, "". In which code string would I include the method?
Private Sub UserForm_Initialize()
Label1.Caption = Format(Now, "mmmm dd, yyyy")
Label2.Caption = Format(Now, "h:mm:ss AM/PM")
End Sub
Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:06"), "KillTheForm"
End Sub
Thanks for the help,
Golf
I'm not real sure this is possible, but I figured you guys would know.
I am currently using the code below using two (2) labels within my splash screen to show the current date and time. What I'm wondering is whether there is a way to construct an IF formula using Label1 in the formula. For example, ...... IF Label1< 10/1/2004, play a specific wav file; IF Label1> 10/1/2004, "". In which code string would I include the method?
Private Sub UserForm_Initialize()
Label1.Caption = Format(Now, "mmmm dd, yyyy")
Label2.Caption = Format(Now, "h:mm:ss AM/PM")
End Sub
Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:06"), "KillTheForm"
End Sub
Thanks for the help,
Golf