word crashes when using exit macros for a form field

C

Chip Orange

Hi all,

we have Word 2003 and I've programmed many applications for my agency using
VBA macros; including several for forms.

recently though, we've found some newer pcs will crash, if we have a form
with an exit macro one a checkbox, and the exit macro does some significant
processing (say running through a collection of fields looking for other
checkboxes which are checked).

What happens is that Word says it has encountered an error and must close
when they click into another form field (this other form field *does not*
have an entry macro).

If I put an "exit sub" at the top of the exit macro in question, all is ok.
on slower pcs all is ok.

Does anyone have any ideas?

thanks.

Chip
 
D

Doug Robbins - Word MVP

If you showed us the code in the macro it might help.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
C

Chip Orange

Hi Doug,

it's related to use of the .checkbox property of formfields which are
checkboxes. I had a routine which ran through all formfields, identified
those which were checkboxes, and did a calculation which it ultimately
placed in another field of the form.

when I stopped doing this, the crash stopped happening.

When I switched to use of the .result property instead of the
..checkbox.value, the crashing stopped. (you can't set a checkbox using
..result, but it will return a "0" for false, or "1" for true).

Next however, instead of crashing, I found that even use of the .result
property of a checkbox form field which ocasionally make the document shift
position by as much as half a screen (users described it as "screen
jumping").

I removed all writing to form fields, and this helped a lot, but a big part
of this automation project was to have been automatically calculated and/or
populated form fields. I've concluded with Word 2003 anyway, this just
isn't possible.

Is any of this a "known issue"? Are there known work arounds?

thanks.

Chip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top