Hi Anil, I don't know much about VB but you can try to use Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) . . "Code before sleep" . DoEvents sleep 100 . "code after sleep" . ********************************************************
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) // Declaration for sleep command DoEvents //Used for updating the screeen so statement before sleep will work properly else the code line before the sleep did execute before the sleep, but the display update it triggered did not. sleep 100<-- in milli seconds use 1000 for 1 second ----- Original Message ----- From: anil kumar To: excel-macros@googlegroups.com Sent: Tuesday, June 30, 2009 7:08 PM Subject: $$Excel-Macros$$ How to use timer in Excel VBA Hi, Actullay i want to use a paticular coding that should be run or re run again after a particular time interval that can be possible in vb through the Timer control can we do the same in excel if any one knows the same please do the needful. how can i use a timer control which is in VB can i use the same in EXCEL VBA if any one know that please send me the the procedure and the code. i m using application.ontime for the same but was not able to do my task. -- Thanks & Regards Anil Kumar --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---