• ActiveX Controls Stop Working

    Author
    Topic
    #496366

    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

    Viewing 7 reply threads
    Author
    Replies
    • #1466874

      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
      [Fmr MS MVP - Word]

      • #1466875

        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

        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.

    • #1466878

      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.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #1466960

        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

        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.

        • #1466979

          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
          [Fmr MS MVP - Word]

          • #1466984

            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

    • #1466988

      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
      [Fmr MS MVP - Word]

    • #1466989

      Well, this is fun. :rolleyes:

      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?

    • #1466990

      That certainly suggests:

      there’s either a fault with the documents or your Office installation (or even both).

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #1466991

        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

        • #1467096

          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

    • #1466992

      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
      [Fmr MS MVP - Word]

    • #1467092

      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.

      • #1467095

        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

    • #1467114

      Gordon

      Yes, I can still type into the first two boxes despite tabbing to the end and back again or looping.

      • #1467116

        Gordon

        Yes, I can still type into the first two boxes despite tabbing to the end and back again or looping.

        Thanks Andrew. I appreciate the effort and feedback.

        Regards
        Gordon

    Viewing 7 reply threads
    Reply To: ActiveX Controls Stop Working

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: