API - Why is macro playing "through" a displayed form?

This one is bugging the crap out of me.

I have a macro that opens several SolidWorks drawings in succession. After one is opened, a new userform is displayed, awaiting input.

Now, for some reason, whenever I play the macro, SW does not display it and just keeps continuing through until it crashes (unsure about that reason too).

However, if I run the macro through the VB editor (step by step), it plays fine, displaying the form and awaiting input.

Any ideas?

Reply to
Fye
Loading thread data ...

Is the form modal? A modal form stops the routine that calls it until the form is closed.

Reply to
That70sTick

Tried both ways... same result either way.

Funny part is that it used to work fine before I made some revisions... obviously, I'm trying to figure out what I may have changed since the revision, but I honestly can't figure out what could possibly cause this - especially considering that if I run it manually (step by step) it works fine.

Reply to
Fye

One thing to look for here, is a call or redirect that is a runtime issue.

Are you willing to post or send the code?

Jeff

Reply to
Jeff

Ok, just found out what the problem was, and it did turn out to be a modal/non-modal form problem.

It had to do with displaying the main form in modal. What was really odd is that it worked fine on other computers, but not the one that i was using to develop the macro. What's even more odd is that it just started to "not work" for no apparent reason.

Oh well, at least it's working now. Took a full day of research and trial and error to find out that it was just one CHARACTER from being correct.

frmMainForm.Show 1 instead of frmMainForm.Show

go figure.

Reply to
Fye

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.