On Thursday, June 14, 2012 10:47:13 AM UTC+8, Bob Flanagan wrote:
On Wednesday, June 13, 2012 2:14:02 AM UTC-4, Anoop V wrote:
My company still uses the older MS Office 2003 everywhere, so I'm
stuck working with that. However, I seem to have come across a runtime
error which started coming up just today. Specifically, Runtime Error
40036 (Application-defined or object-defined error).
It seems to come up every time the compiler reaches a Worksheets
container in my code. So far, it's prevented me from using the lines:
Worksheets("Sheet1").Activate
or
Worksheets("Sheet1").Range("A1").Value = 4
or anything related to the container. Till yesterday, all of my code
had been running without any hitches, but starting from today morning
this error came up everywhere this container was used.
I've looked at other forums for help on this, and in each place it
appears this error seems to have come up for a random command or
object, even if the code had functioned properly before. Also the
solutions, where given, were always workarounds specific to that line
of code, and nothing that directly solved the problem, except for
reinstalling the entire MS Office, which I can't do due to Admin
rights. Any help?
Another possibility is that the sheet has become protected.
Robert Flanagan
Add-ins.com LLC
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
No, the workbook was completely unchanged. It was working on Monday, and then on Tuesday it started causing the runtime error. There was no renaming of sheets or change in protection.