InvalidateControl in Excel not working... not sure what I'm doing wrong

Brad McIntyre 101 Reputation points
2023-02-08T22:54:36.08+00:00

Thank you for taking the time to read my question.

I have an EditBox in my ribbon that I want to clear after a button is clicked (also in the ribbon).

I have this at the top of my module:

Dim MyRibbon As IRibbonUI

Sub MyAddInInitialize(Ribbon As IRibbonUI)

Set MyRibbon = Ribbon

End Sub

And this is the code that I'm having issues with. When I click my button and call Sub CommandButton16 (or 17) I want the last thing it does to be clearing 2 EditBoxes. So far just trying to clear the one.... but I'm getting the error shown in the screen.

What am I doing wrong?

ClearEditBoxes

TheXML

Above is the XML from Office RibbonX Editor pertaining to my buttons that do stuff, then I want them to clear the editBoxes after.

Thanks!

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,480 questions
0 comments No comments
{count} votes