Reputation: 8034
I am following this script
it looks simple and straight forward.
but when I open the excel file I get these errors
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Compile error:
Expected Function or variable
---------------------------
OK Help
---------------------------
I am not sure if I am doing anything wrong
but everything looks alright to me
any idea how to fix that?
Thanks K Daves
Do you know why I get error on End Sub and On Error Resume Next?
Upvotes: 2
Views: 587
Reputation: 10139
There was an HTML coding error on their website.
In the sub TimeSetting()
, it should look like this:
Sub TimeSetting()
CloseTime = Now + TimeValue("00:00:15")
On Error Resume Next
Application.OnTime EarliestTime:=CloseTime, _
Procedure:="SavedAndClose", Schedule:=True
End Sub
The <span style="background-color:#ff0">
portion that was in your code was actually meant to style the the Sub on their website - not meant to be part of the code.
Upvotes: 2