View Single Post
 
Old 05-02-2019, 02:44 PM
RaudelJr RaudelJr is offline Windows 10 Office 2013
Novice
 
Join Date: Apr 2017
Posts: 9
RaudelJr is on a distinguished road
Default Odd behavior when Command Buttons are present.

Hi,

I have a situation where word has an odd behavior when Command Buttons are present.

I'm attaching two Word Template files, one with buttons and one without.

The file with No Buttons was the original file.
I added the buttons to the file to copy content between bookmarks, using a Button and also to reset form by clearing all fields using a Button.

But it seems like adding the Buttons caused a sort of a glitch.

If you look at the VBA code, the UpdateUptions() Macro is supposed to select the corresponding bookmarked dropdowns and display the selections.

It does it correctly when the form has no Buttons. But as soon as the Buttons are added, at the end of the UpdateOptions() macro, Word seems to move to a field that is after the intended dropdown.

The file attached with No Buttons, has the UpdateOptions() macro working as expected, though if you were to edit this file and add a command button, and do nothing more, it will begin having the problem.


And the file attached With Buttons, has the UpdateOptions() macro affected by the presence of the buttons.

Not sure how to resolve the weird behavior.

Thanks in advance for your help.

Raudel

EDIT >> I would like to add, that the issue is easier to observe if you change the Word settings to view Hidden Text (Options>Display>Select Hidden Text
Attached Files
File Type: dotm DropdownDependentNoButtons.dotm (35.9 KB, 8 views)
File Type: dotm DropdownDependentWithButtons.dotm (42.1 KB, 7 views)

Last edited by RaudelJr; 05-02-2019 at 05:02 PM.