ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   display userform at certain time (https://www.excelbanter.com/excel-worksheet-functions/208248-display-userform-certain-time.html)

Anthony

display userform at certain time
 
Hi all,

Can anybody help in showing me how I can have a userform displayed when the
time is equal to 11am ??
Once displayed the user then has two options to chose from,,
YES or NO
if they select NO how do I then redisplay the userform 1hour later, if they
select YES display userform2
i have managed to edit some old code to get part of my question answered.
This code will display my userform if the time is after 11am

Private Sub Workbook_Open()
Dim z As Date, t As Date
z = Sheets("sheet1").Range("E1").Value
t = z - Int(z)
If TimeValue(t) "11:00" Then
frmSweepcheck.Show

Else
Sheets("sheet1").Select
End If

End Sub


but how do I change this so that the userform Sweepcheck is re-displayed at
1200 (ie 1hr later than 11am) if the user selects NO as the option from the
Sweepcheck userform?

thanks



ShaneDevenshire

display userform at certain time
 
Hi,

Look at Application.OnTime

In the VBA help area
--
Thanks,
Shane Devenshire


"Anthony" wrote:

Hi all,

Can anybody help in showing me how I can have a userform displayed when the
time is equal to 11am ??
Once displayed the user then has two options to chose from,,
YES or NO
if they select NO how do I then redisplay the userform 1hour later, if they
select YES display userform2
i have managed to edit some old code to get part of my question answered.
This code will display my userform if the time is after 11am

Private Sub Workbook_Open()
Dim z As Date, t As Date
z = Sheets("sheet1").Range("E1").Value
t = z - Int(z)
If TimeValue(t) "11:00" Then
frmSweepcheck.Show

Else
Sheets("sheet1").Select
End If

End Sub


but how do I change this so that the userform Sweepcheck is re-displayed at
1200 (ie 1hr later than 11am) if the user selects NO as the option from the
Sweepcheck userform?

thanks



Anthony

display userform at certain time
 
I'll give that a look,
Thanks

"ShaneDevenshire" wrote:

Hi,

Look at Application.OnTime

In the VBA help area
--
Thanks,
Shane Devenshire


"Anthony" wrote:

Hi all,

Can anybody help in showing me how I can have a userform displayed when the
time is equal to 11am ??
Once displayed the user then has two options to chose from,,
YES or NO
if they select NO how do I then redisplay the userform 1hour later, if they
select YES display userform2
i have managed to edit some old code to get part of my question answered.
This code will display my userform if the time is after 11am

Private Sub Workbook_Open()
Dim z As Date, t As Date
z = Sheets("sheet1").Range("E1").Value
t = z - Int(z)
If TimeValue(t) "11:00" Then
frmSweepcheck.Show

Else
Sheets("sheet1").Select
End If

End Sub


but how do I change this so that the userform Sweepcheck is re-displayed at
1200 (ie 1hr later than 11am) if the user selects NO as the option from the
Sweepcheck userform?

thanks




All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com