Author Topic: ActiveX textbox stops custom Ribbon (fluent UI) from working  (Read 653 times)

0 Members and 1 Guest are viewing this topic.

daihashi

  • Full Member
  • ***
  • Posts: 83
ActiveX textbox stops custom Ribbon (fluent UI) from working
« on: April 05, 2014, 03:01:23 PM »
I wasn't quite sure where to post this one, so I decided to just post in the general visio forum.

So I've been going through my templates and trying to polish it so that it has more of a "professional" look and feel to it. Part of this effort involves using RibbonX/Fluent UI so that the macros that are currently only accessible via a right click, can also be accessible on the ribbon. Everything works unless I click a button on the ribbon that calls a macro that drops a stencil that contains an activex text box. It successfully runs the macro, but after that none of the buttons will work.

All of the buttons work until I click one that is related to a macro that drops the activex text box. I can't seem to figure out why this is happening, or how to fix it. Has anyone encountered this, or can anyone at least point me in the right direction of what I should be looking for to solve this?

Thanks!

Get Visio Guy's new book!


Yacine

  • Hero Member
  • *****
  • Posts: 1153
Re: ActiveX textbox stops custom Ribbon (fluent UI) from working
« Reply #1 on: April 05, 2014, 04:47:23 PM »
an un-catched error stopping the ribbon???
Yacine

Visit the Visio Guy web site at www.visguy.com for hundreds more articles on Visio!


daihashi

  • Full Member
  • ***
  • Posts: 83
Re: ActiveX textbox stops custom Ribbon (fluent UI) from working
« Reply #2 on: April 05, 2014, 04:59:25 PM »
an un-catched error stopping the ribbon???

Let me check; I'll try to step through it and see what I can find. The same macro runs perfectly fine via shapesheet actions or action tags, and I can run it as many times without fail.

What's particularly odd is that the activeX textboxes act as if the document is in design mode, but if I activate design mode and then turn it off again then the activeX boxes work; unfortunately this does not also fix the buttons on the ribbon. They will only work again upon closing and re-opening the document.

I'll look through my code again more carefully and report back.

daihashi

  • Full Member
  • ***
  • Posts: 83
Re: ActiveX textbox stops custom Ribbon (fluent UI) from working
« Reply #3 on: April 05, 2014, 06:22:22 PM »
It seems like I am getting an error, but it happens right on "End Sub" of the Macro that get's called.  The only error I receive is "Cannot Enter Break mode at this time". I could not find anything wrong with the code itself, however after poking around a bit in the VBA editor it seems like the reference for ActiveX Data Object is getting removed/unchecked. This only happens when I run the macro from the ribbon via iRibbonControl; if I run the macro manually or via shapesheet action then the reference does not get removed.

updated: Actually I apologize, but my statement above is not true. I was actually looking at another VBA project references and didn't realize it. Now I really don't have any idea as to why this is happening. :(
« Last Edit: April 05, 2014, 06:39:14 PM by daihashi »


daihashi

  • Full Member
  • ***
  • Posts: 83
Re: ActiveX textbox stops custom Ribbon (fluent UI) from working
« Reply #4 on: April 05, 2014, 07:19:24 PM »
I've attached a stripped down version of my document here. The code is in the document, and you can see the error by placing a breakpoint as shown in the attached image.. inside the ribbon class module, and then step through the rest of the code. For some reason this version actually generates the error immediately upon dropping the stencil, as opposed to on "end sub" in the version I am trying to fix.

I have other masters that also have activex controls, and the custom ribbon/buttons also stop working when I invoke those via the fluent UI ribbon as well. So it's not specific to the stencil in this particular example file, it does it on any stencil that uses an ActiveX text box.
« Last Edit: April 05, 2014, 07:21:22 PM by daihashi »

cliff50

  • Full Member
  • ***
  • Posts: 127
Re: ActiveX textbox stops custom Ribbon (fluent UI) from working
« Reply #5 on: April 06, 2014, 04:12:20 AM »
just a thought .. check the documents add_shape event 
what version of Visio is this ?
Cliff