Sorry for replying to my own thread,
The solution was in the variable type passed back to returnedVal. Shortly after posting I rmembered that I'd had some previous trouble before with returned values to the RibbonUI that was solved by casting the returned valriable to the variant Type
I changed all assignments to returnedVal to cVar(<expression>) (Cast the boolean to a variant).
Everything worked first time.
Now I have the RibbonX book and I've scoured VBA pages in relation to ribbon stuff and I haven't come across this requirement. So having wasted a day on this you can Imagine I'm pretty cheesed off.
|