I use to include the sentence "Application.EneableEvent = 'False' or
'True'" in VBA applications developed in the MS-Excel platform. It works
very well in association with actions performed in the spreadsheets or the
workbook, but not when the action is performed in Userforms.
Now I am develop a short utility in VBA using the MS-Word platform and
I need to know if it is posible to un-eneable the events associated to
elements of a Userform created with VBA in MS-Word?
Doug Robbins - Word MVP - 18 Nov 2006 22:37 GMT
You can certainly enable or disable controls on a userform using the
.Enabled attribute of the control
[controlname].Enabled = False
will disable the control named controlname. Setting the attribute to True
will enable the control.

Signature
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
> I use to include the sentence "Application.EneableEvent = 'False' or
> 'True'" in VBA applications developed in the MS-Excel platform. It works
[quoted text clipped - 4 lines]
> I need to know if it is posible to un-eneable the events associated to
> elements of a Userform created with VBA in MS-Word?
Shauna Kelly - 18 Nov 2006 22:55 GMT
Hi MorenD
Word (sadly) has no equivalent of Excel's Application.EnableEvents method.
And no VBA has an .EnableEvents that works in user forms.
The workaround is generally to create a global or module-wide variable
called, say, bEventsEnabled as a boolean. Wrap your code like this:
If bEventsEnabled then
'your code here
Endif
and set bEventsEnabled to False when you don't want the event code to run.
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
> I use to include the sentence "Application.EneableEvent = 'False' or
> 'True'" in VBA applications developed in the MS-Excel platform. It works
[quoted text clipped - 4 lines]
> I need to know if it is posible to un-eneable the events associated to
> elements of a Userform created with VBA in MS-Word?
Jezebel - 19 Nov 2006 02:19 GMT
Another approach is put the from controls inside a frame: then you can
enable/disable them collectively by enabling/disabling the frame.
> Hi MorenD
>
[quoted text clipped - 25 lines]
>> I need to know if it is posible to un-eneable the events associated to
>> elements of a Userform created with VBA in MS-Word?