I'm trying to develop a simple timer that counts down from 30 sec to 0 then resets back to 30 sec and I must have this macro run automatically when the workbook is open. The excel file is called Book1.xls and the page I want to place my macro is called "Sheet1" (not the real names but my test file uses default names).
I'm not a VB Programmer by any means and need some help completing this task. Below is my code and i've indicated where I get the error:
Function timer()
Application.Wait Now + TimeValue("00:00:30"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End Function
Sub Book1_Open() '<=== ERROR:Expected Sub,Function or Property. I thought I specfied by subroutine?
' While (1) 'Will uncomment later
timer
' endwhile
End Sub
I'm not a VB Programmer by any means and need some help completing this task. Below is my code and i've indicated where I get the error:
Function timer()
Application.Wait Now + TimeValue("00:00:30"
End Function
Sub Book1_Open() '<=== ERROR:Expected Sub,Function or Property. I thought I specfied by subroutine?
' While (1) 'Will uncomment later
timer
' endwhile
End Sub