![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Dec 2006
Location: Braidwood NSW Australia
Posts: 6
OS: 2000
|
I would like some help with setting up a message box to come up every day every hour on the hour, it needs to be a reminder for a worker to do a check, it needs to happen exactly on the hour eg. 12am 1am 2am etc. There are two workers who do this in rotating shifts over the twenty four hour period.Is there anyone out there who could help me please!!!!
,Iceman 26 |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
Hi and welcome to TSF.
This should do what you want. This first part goes in ThisWorkbook Module. Code:
Private Sub Workbook_Open() StartTheClock End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) StopTheClock End Sub Code:
Public ScheduleTime As Double Sub StartTheClock() Dim nextHour As Integer nextHour = Hour(Time) + 1 ScheduleTime = TimeValue(nextHour & ":00:00") Application.OnTime ScheduleTime, "PopMessage" End Sub Sub PopMessage() MsgBox "Wake up! - It's time to do that check!" End Sub Sub StopTheClock() On Error Resume Next Application.OnTime EarliestTime:=ScheduleTime, Procedure:="StartTheClock", schedule:=False End Sub Post back if you have any problems.
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner Last edited by Glaswegian; 12-11-2006 at 02:38 AM. |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Dec 2006
Location: Braidwood NSW Australia
Posts: 6
OS: 2000
|
![]() Thanks very much again Iceman26 ![]() |
|
|
|
|
|
#5 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
You are welcome.
![]() Can you give me a bit more info about this other reminder. Is this separate from the hourly message? Is it, in effect, changing the hourly message to a half hourly message or do you mean something different? Is the new reminder based on an entry in a sheet? The more detail you give me, the easier it will be for me to provide you with a solution.
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
|
|
#6 (permalink) |
|
Registered User
Join Date: Dec 2006
Location: Braidwood NSW Australia
Posts: 6
OS: 2000
|
This reminder is based on an entry in the the sheet, the sheet has a drop down arrow box that is in regards to the hourly check that has the choice of heard or error, i need the message box to come up on the half hour only if these have not been filled, Thank you again for your patience and your help
it is very much appreciated, Iceman26 |
|
|
|
|
|
#7 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
OK, so you need a message to appear every half hour if the dropdown box has not been filled - yes? What are the possible values for the dropdown box? Does it normally show a blank and then a value after completion? What is the cell address of the dropdown and sheet name?
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
|
|
#8 (permalink) |
|
Registered User
Join Date: Dec 2006
Location: Braidwood NSW Australia
Posts: 6
OS: 2000
|
New Reminder
Yes to the first question, The possible variables are "Heard" or "Error", it normally shows blank then a value after completion, the cell address of the dropdown and sheet name are "C:6 to G:29" inclusive "Sheet1", The cells C:6 & G:6 represent the check for 01:00:00 UTC, C:7 & G:7 for 02:00:00 UTC etc.
& is there a way of making excel maximise when the message box comes up!!! I am very very grateful for your help and your time, Thanks Iceman26 |
|
|
|
|
|
#9 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
Hi Iceman26
The easy bit - to maximise Excel, add this line just before your message box line Code:
Application.WindowState = xlMaximized
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
|
|
#10 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
Hi again
Try this: These first declarations go at the top of the Module, i.e, before any subs Code:
Public RunWhen As Double Public Const cRunIntervalMins = 30 ' thirty minutes Public Const cRunWhat = "HalfHourWarning" Code:
Sub StartTimer()
RunWhen = Now + TimeSerial(0, cRunIntervalMins, 0)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
End Sub
Sub HalfHourWarning()
If Sheets("Sheet1").Range("B1").Value = "" Then
MsgBox "Don't forget to check it...", vbInformation, "Check it..."
End If
StartTimer
End Sub
Hope this works for you.
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
![]() |
| Thread Tools | |
|
|