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
|
|
0
|
|
|
|
Reply
|
Chip
|
4/8/2010 8:27:19 PM |
|
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
"Chip Orange" <Chip.Orange@psc.state.fl.us> wrote in message
news:#JnHtn11KHA.3652@TK2MSFTNGP04.phx.gbl...
> 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
>
>
>
|
|
0
|
|
|
|
Reply
|
Doug
|
4/9/2010 1:30:56 AM
|
|
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
"Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
news:82888CEC-38AC-4FCE-BA27-AA60436B2635@microsoft.com...
> 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
>
> "Chip Orange" <Chip.Orange@psc.state.fl.us> wrote in message
> news:#JnHtn11KHA.3652@TK2MSFTNGP04.phx.gbl...
>> 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
>>
>>
>>
|
|
0
|
|
|
|
Reply
|
Chip
|
4/13/2010 4:14:19 PM
|
|
|
2 Replies
509 Views
(page loaded in 0.125 seconds)
Similiar Articles: Enabling macros in a form - microsoft.public.word.docmanagement ...... may be inserted in the document using docvariable fields. For the basics, see Word MVP ... own - microsoft.public.word ... word crashes when using exit macros for a form ... Refresh form after macro updates fields - microsoft.public.access ...Currently, the user has to exit the Policies form and re-enter (or ... Refresh form after macro updates fields DataBase I am using Access 07. I have a form Employees based ... PDF disables Word Macros - microsoft.public.word.vba.general ...Jon Borel wrote: >A little more info: Although I can't run my macros until I close and then >reopen the document, Word's built-in macros seem to run fine (signs point ... Word Form / Fields or VBA / calculate on print - microsoft.public ...You could include macros with the names of ... hits PRINT, > which does not let the field "calculate on exit ... Word Form / Fields or VBA / calculate on print - microsoft ... Word, Form Fields and the Enter Key - microsoft.public.word.vba ...... the previous Form Field, and then exit that Form Field ... End Sub Sub AutoOpen() ' This macro will reassign the ENTER key when you open an existing ' Word form fields ... Word, Form Fields, and the Enter Key - microsoft.public.word ...... previous Form Field by using the left arrow or mouse, for example and then exit ... This macro will reassign the ENTER key when you open an existing ' Word form fields ... macro to run automatically when a field is updated - microsoft ...... from four different scoring areas on the form. The second field evaluates this score (using a macro ... So why not call the macro via to 'on exit' property of the fields ... Simple VBA crashes Access 2007, why? - microsoft.public.access ...... to spreadsheet, run an autoopen macro, and ... Word 2007 (on Vista) crashes when using CreateObject in VBA ... ... Print a form crashes Access 2007 - microsoft ... PDF add-in disabled on it's own - microsoft.public.word ...Macro for Calendar - microsoft.public.excel.misc PDF add-in disabled on it's own - microsoft.public.word ... word crashes when using exit macros for a form field 4/8/2010 ... Text form field loses formatting in Word 2010 - microsoft.public ...A way around the problem is to run the following macro on exit from any ... field as a phone number - microsoft ..... you are able to format a form field in Word ... word crashes when using exit macros for a form field WordWord - word crashes when using exit macros for a form field word crashes when using exit macros for a form field - WUGNET ForumsHi 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 ... Wierd Word Macro Crash - HELP!!!! Word - Word Discussion List ...... field after the N/A checkbox instead of using the tab key, Word crashes ... as the _entry_ macro instead of the exit macro and that works. When you turn on a form field ... Automate your form - Word - Office.com - Microsoft Corporation ...To run a macro when the insertion point exits the form field, click the macro in the Exit box. Note If you store the entry and exit macros in your Normal template and ... How to update fields in a protected form in Word 2003 and in Word 2002Describes how to use the "Calculate on Exit" option or a macro to update fields in a protected form. The fields can also be updated by referencing a form ... 7/24/2012 12:42:27 PM
|