• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Please tell me how to highlight or pop up things

Abhijeet

Active Member
Hi

can u please tell me how to pop up things in excel every 30mins that message will be show 5min then close and after 30 min again show the same message
 
Hi Aberjeet,

In response to your query, Excel (VBA) is very good at responding to things that happen (eg typing in a cell or clicking on a UserForm) (in VBA these are called Events) but it is more difficult when it is waiting for a set time (be it 5 min from now or 30 min from now).

The actual code is straightforward enough (see http://msdn.microsoft.com/en-us/library/office/ff822851.aspx)
Code:
Application.Wait(Now + TimeValue("0:05:00"))

But while a Macro is running it locks Excel so you can't do anything else.

What is the purpose of the message box?
Is the user supposed to respond? (eg click OK)

I would recommend you try and provide a message in response to an event (something the user does, or clicks on), rather than a time.

Regards,

Peter
 

Hi,

same question like previous post, so same answer : possible for advanced developers by Windows API …
 
I found this code but i want when i click ok then other message will show i have data in rowA1,A2then A3 please tell me how to do this
Public RunWhen As Double
Public Const cRunIntervalSeconds = 10 ' <------- This number represents 10 seconds. Change to 600 for 10 minutes
Public Const cRunWhat = "Timer" ' the name of the procedure to run

Sub StartTimer()
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime EarliestTime:=RunWhen, Procedure:=cRunWhat, _
Schedule:=True
End Sub
Sub Timer()

MsgBox [A1], , "Time is up" ' Change 10 seconds to whatever you want that matches the time set in line 2

StartTimer ' Reschedules/Resets the procedure to run again and again
End Sub
 
Back
Top