Oliver Dewar
Board Regular
- Joined
- Apr 17, 2011
- Messages
- 201
Hi All.
I have macros with this line of code:
the macros have been working perfectly for months and then suddenly I get the word 'now' highlighted and this error in vba:
Compile Error:
Expected function or variable.
What's happened and how can I fix it?
Thanks in advance.
----> extra thought:
I created a sub called "protect" and vba told me it was an ambigous name... could I have inadvertently created a sub that's the same as a system function and mixed things up, or switched off excels functions or something? (Hopefully it's simpler than that!)
I have macros with this line of code:
Code:
Application.Wait now + TimeValue("00:00:01")
the macros have been working perfectly for months and then suddenly I get the word 'now' highlighted and this error in vba:
Compile Error:
Expected function or variable.
What's happened and how can I fix it?
Thanks in advance.
----> extra thought:
I created a sub called "protect" and vba told me it was an ambigous name... could I have inadvertently created a sub that's the same as a system function and mixed things up, or switched off excels functions or something? (Hopefully it's simpler than that!)
Last edited: