Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Question ActiveX Controls Stop Working

    I have a form with a number of combos, text boxes and command buttons. See attached file.

    If I open the file in Word 2013 and simply tab through the fields to the end, the two command buttons and the two text boxes on the first page stop working. Is anyone able to tell me why and how to stop this happening. I've tried re-building the form but the problem comes back again. There is code to setup the combos at load but I've removed all other event handlers to try and focus on the problem.

    Any suggestions where to look or what to try will be greatly appreciated.

    Thanks
    Gordon
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    What do you mean by "the two command buttons and the two text boxes on the first page stop working"? In what sense? Since there's no code behind any of these, it's not apparent that anything in particular should happen.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    When you open the file, the buttons depress when you click them. After the "problem" occurs, they no longer respond to the mouse at all. With the textboxes, you can't click and type in them.

    I took all code out to make the file a bit safer for people and to show that code is not causing the issue.

    Thanks
    Gordon

    Quote Originally Posted by macropod View Post
    What do you mean by "the two command buttons and the two text boxes on the first page stop working"? In what sense? Since there's no code behind any of these, it's not apparent that anything in particular should happen.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    I suspect your document has some form of corruption. It seems to work OK in Word 2010 but, when saved in doc format and opened in Word 2003, the buttons don't seem to work.

    Corrupt documents can often be 'repaired' by inserting a new, empty, paragraph at the very end, copying everything except that new paragraph to a new document based on the same template (headers & footers may need to be copied separately - for your document, you'll also need to transfer the code), closing the old document and saving the new one over it.

    PS: I can't see what you're doing that actually requires ActiveX controls - everything in your document could be done with content controls or formfields - and without the code you now need to pre-populate them.
    Last edited by macropod; 2014-09-10 at 05:33.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. The Following User Says Thank You to macropod For This Useful Post:

    weakpa2 (2014-09-11)

  6. #5
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Thanks

    There is a bit of code in the full file. I stripped this one to make it as simple as possible while still showing the problem. I'm using ActiveX controls as I need to trap changes so I can fill in some items based on the content of others. ie If certain questions are set to No, set another to "N/A".

    I've tried the copy solution several times and it doesn't seem to help. I've also constructed a fresh file copying nothing and the same problem occurs.

    Thanks
    Gordon

    Quote Originally Posted by macropod View Post
    I suspect your document has some form of corruption. It seems to work OK in Word 2010 but, when saved in doc format and opened in Word 2003, the buttons don't seem to work.

    Corrupt documents can often be 'repaired' by inserting a new, empty, paragraph at the very end, copying everything except that new paragraph to a new document based on the same template (headers & footers may need to be copied separately - for your document, you'll also need to transfer the code), closing the old document and saving the new one over it.

    PS: I can't see what you're doing that actually requires ActiveX controls - everything in your document could be done with content controls or formfields - and without the code you now need to pre-populate them.

  7. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by dogknees View Post
    There is a bit of code in the full file. I stripped this one to make it as simple as possible while still showing the problem. I'm using ActiveX controls as I need to trap changes so I can fill in some items based on the content of others. ie If certain questions are set to No, set another to "N/A".
    None of that requires ActiveX controls which, BTW, don't work on Macs (I don't know if that matters for you). You could just as easily use content controls or formfields. With formfields, the example you gave doesn't even require any VBA - it can all be done with field coding.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #7
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by macropod View Post
    None of that requires ActiveX controls which, BTW, don't work on Macs (I don't know if that matters for you). You could just as easily use content controls or formfields. With formfields, the example you gave doesn't even require any VBA - it can all be done with field coding.
    The file I posted is nowhere near the whole story. There is code to modify some controls when others change. There is validation code that runs to ensure the answers are consistent. There is code to send the file to a database. This isn't a new form that I've just built, it's been in use for several years with minor changes each year.

    The file I posted was specifically to illustrate the problem that is occurring when using Word 2013. I removed everything that was not relevant or contained company IP.

    I'm currently rebuilding it using Content Controls which is working OK so far. The look and usability of the CCs is really not as good as activex controls, but I seem to have little option. ActiveX controls just make using the form so much more efficient for the user. I have a lot of combos with Yes/No options. The user is able to tab to the control and press either y or n to select an answer. This doesn't work in CCs. CCs also change appearance in confusing ways after you enter text and look cluttered. I've also had issues with them not displaying properly when there are a large number of them in a document.

    Part of the issue here is that we have a lot of forms that will break in Word 2013. MS don't seem to care that the product breaks existing documents, and I've been unable to find an answer to why this is happening and how to stop it. I can't even find reference to this error anywhere.

    I appreciate your assistance and suggestions, but it is frustrating that I can't get an answer as to why this is happening and how to fix the existing file rather than rebuild everything in a new way. I've had some feedback from an MVP via MS forums and it's the same. Yes, it breaks, no idea why. No hints as to how to troubleshoot the issue, just try a different type of control.

    Now I'm in the situation that I don't know which controls will work and which won't. MS give us CCs but no change event(I know how to generate one using a monitor routine, but having to do so is ridiculous and unstable) and none of the control over appearance of the traditional form or activex controls, so of course I want to use activex controls to give my users a better looking, easier to use form. But, I have to test it after every step to make sure I don't hit this bug and have to start over with CCs.

    Thanks again for your suggestions. Please excuse the rant but I'm sure you can understand my frustration with the situation!

    Regards
    Gordon

  9. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    I feel the pain but, since I don't have Word 2013 to work with, I can't tell whether the issue is generic to that version. If it isn't, there's either a fault with the documents or your Office installation (or even both).

    FWIW ActiveX controls are on their way to deprecation (I don't have info on when support for them might be removed, though) as they're inherently unsafe (which is apparently why Apple never allowed them on Macs), so you may well have to resort to CCs in the not too distant future.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  10. #9
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Thumbs down

    Well, this is fun.

    I just found after replacing all the activex controls with Content Controls and recoding everything, exactly the same problem occurs. I scroll down and fill in a couple of items and then scroll back to the top of the document and the buttons are not responding again.

    Don't you just love MS?

  11. #10
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    That certainly suggests:
    there's either a fault with the documents or your Office installation (or even both).
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  12. #11
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by macropod View Post
    That certainly suggests:
    It's a new document I created from scratch. I've tested on other staff members PCs with 2013 and the same thing happens. This was also the case with the original file. The MVP that had a look acknowledge that it also failed on his PC, but had no suggestions as to finding a solution.

    It seems to have settled down. I removed and replaced the buttons and they are working. Now we just have to see if it still works tomorrow. At least it's amusing my workmates!

    Regards
    Gordon

  13. #12
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    FWIW, if the template the documents are based on is itself faulty, all documents created from it are liable to inherit the same fault. Similarly, a rogue 3rd-party addin could impact the document's performance.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  14. #13
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I just tested the file you posted at the top on Word 2013 and I can tab right through the document and back through again a second time.

    As such, I can't work out where this might be going wrong on your machine.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  15. #14
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Andrew Lockton View Post
    I just tested the file you posted at the top on Word 2013 and I can tab right through the document and back through again a second time.

    As such, I can't work out where this might be going wrong on your machine.
    Andrew,

    To confirm, after tabbing through, are you able to enter something in the two text boxes at the top of the form?

    Thanks
    Gordon

  16. #15
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by dogknees View Post
    It's a new document I created from scratch. I've tested on other staff members PCs with 2013 and the same thing happens. This was also the case with the original file. The MVP that had a look acknowledge that it also failed on his PC, but had no suggestions as to finding a solution.

    It seems to have settled down. I removed and replaced the buttons and they are working. Now we just have to see if it still works tomorrow. At least it's amusing my workmates!

    Regards
    Gordon
    They are based on the standard Blank Document template that ships with Office.

    Thanks
    Gordon

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •