Option Explicit Off or 'Require Variable Declaration' does not work under excel 2007
Hello all,
I recently upgraded from Excel 2003 to 2007 (Basic - English).
Now I have a lot of excel forms/files with macro's written in VBA.
Of course I should have declared the variables from the start but a lot of marco's have been written without it. As long as I uncheck 'Require Variable Declaration', I could run these macro's without an flows or fails.
Running these marco's under 2007 immediately started the debugger telling me that => Compile error: Can't find project or library.
To see if it was a declarartion fail I started declaring some variables => seem to be the issue.
For now I thought: Unchecking 'Require Variable Declaration' in 2007 and I can go on.
Unfortunatelly .... this does not do ANYTHING!!!!!! (same fail message at start of macro)
Adding the line 'Option Explicit Off' at the beginning of my module does also nothing!!!!
Strange thing: if I type 'Option Explicit' it accepts the line but if I add 'On' or 'Off' it starts complaining with the following message => Compile Error: Expected end of statement
What could be wrong?
For an exercise I removed a lot of the macro's and declared all variables who were left over => new error message => it seems to be complaining about the functions like Right, Left etc. The standard excel functions.
Question 2: Should these build-in excel functions be addressed with ... Application.Right(...) ??
IS this new in 2007 or can I disable the need for this direct addresssing?
(I ask this because 2003 does not complain)
Any info would be appreciated.
Excel
Video Tutorials / Excel Dashboards Reports
Bookmarks