1 Attachment(s)
Excel crashing after running macro to work with autocad and after deleting column
Hi all,
I have a macro to copy selected cells and paste it into specific format, it’s basically a coordinate(easting and northing) list with semicolon delimiter, and then save it into notepad.
After that my macro open autocad and call a lisp that I wrote in autocad to import the notepad into point with description.
I use excel and autocad 2007.
My macro works as expected. However I have small irritating problem. Which is after I run the macro and the point is plotted on the autocad, if i deleted columns in excel by selecting by highlighting in the “ A B C D….” bar (For example I deleted column F to column I by highlighting the I to F bar), and then I click the “File” or “Edit” in the autocad toolbar. The excel will crash. It will close itself and then opened again in recovered mode.
When I click the “file” or “edit” the mouse cursor is showing the “thinking” animation for a second. And then the excel just crashed.
After several testing, the workaround is to perform an action in excel. For example if I copy and paste a random cell after I deleted columns, when I click the “File” or “Edit” it will not crash the excel. I’m guessing it’s a problem with the way I wrote my code and something related to selection.
It’s just that I want this code to be also used by my friends and I want it to be free of bugs.:yes
I wonder if there’s something that I can improve in my vba code? I tried of many ways that I can think of but to no avail.
I hope that there’s someone with similar problem that know the solution or someone that can enlighten me with the problem
Thank you very much.:)
Edit: See next post. ST