Michael Osipowicz

SIMPLE MACRO YIELDS RUNTIME ERROR 91 EVERY OTHER TIME IT RUNS

Discussion created by Michael Osipowicz on Jan 31, 2020
Latest reply on Feb 7, 2020 by Mike Spens

Looking for someone to tidy this code up, I don't write macros or code like this ever but I've gotten the results I need. 

 

I modified a macro that inserted a numbered bubble into every drawing dimension in a solidworks drawing file, then exported all of the dimensional values into excel in order of the bubbled numbers. 

 

I modified it so it is dumbed down. It creates the numbered bubbles, then creates an excel sheet that just displays a row of the bubbled numbers, then an empty row where I am going to have some people in the quality area assign gaging information in the spreadsheet. This spreadsheet will then be linked into our operation drawings. 

 

It works... But it only works every other time... Every other time I run it, I get runtime error 91. 

 

I'm sure someone can fix this in about 5 seconds. Any ideas?

Outcomes