M
mtechserv
I've written an AutoCAD VBA program that is activated from a toolbar button in ACAD. It retrieves info. from the drawing, then opens Excel and writes the drawing info to Excel. The program works fine the first time I use it. Then I close Excel, and try to run the program from AutoCAD again, but it crashes after Excel opens, but before it writes the data to the spreadsheet.
In order to run the program again without crashing, I need to go into the VBA editor, and reset the program. It wil then work fine one time, then crashes again the second time until I reset everything.
It appears as though it doesn't release the ActiveSheet member. How do I fix this?
In order to run the program again without crashing, I need to go into the VBA editor, and reset the program. It wil then work fine one time, then crashes again the second time until I reset everything.
It appears as though it doesn't release the ActiveSheet member. How do I fix this?