MrExcel Publishing
Your One Stop for Excel Tips & Solutions

show a userform every 10 minutes


Posted by Mellisa on December 08, 2001 11:37 AM

Could someone please show me the vba code that will
automatically show a userform every 10 minutes
TIA
Mellisa


Posted by Antigonus on December 09, 2001 4:12 PM


Dim showTime As Date
Sub Show_UserForm()
showTime = Now + TimeValue("00:10:00")
Application.OnTime showTime, "Show_UserForm"
On Error Resume Next
UserForm1.Show
End Sub
Sub Auto_Close()
On Error Resume Next
Application.OnTime showTime, "Show_UserForm", schedule:=False
End Sub


Posted by Antigonus on December 09, 2001 4:20 PM

Also ....


If you want to show the user form when the workbook is opened :-

Private Sub Workbook_Open()
Show_UserForm
End Sub