I am working on code to populate a customer form. On the worksheet are some Form buttons (not Command Buttons/oleobjects) that do simple code such as inserting rows if you need to add more items than are initially displayed.
I would like to simulate clicking these buttons through VBA code. Ordinarily, I would do something like:
Where RunButtonCode is the macro that the creator assigned to the button. However, the VBA code is locked and hidden, so I get an error trying to run the above code.
Let me reiterate - these are not Command Buttons, so I can't just do MyButton_Click. There are no VB events tied to the button - only the macro assigned to it.
I have run across a Buttons object that, I think, may be a legacy type object inherited from earlier versions, but I haven't figured out how to invoke a Click event on it.
I can access the buttons via the Shape event, but Shapes don't have a Click event either.
Does anyone have any advice? It sure seems like it should be simple. Just simulate a button click on a worksheet. No big deal... or not.
"The face of a child can say it all, especially the mouth part of the face." - Jack Handey