View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Neil[_32_] Neil[_32_] is offline
external usenet poster
 
Posts: 6
Default Userform with commandbar popup

On Mar 4, 10:06*am, Neil wrote:
Hi there

It seems that many people have had issues with getiing popup
commandbars to work correctly with userforms.

I am at the stage where this all works fine, however, my problem is
that I show userform A, that shows userform B containing a treeview
from which the user can select options.

Userform B has the popup commandbar that allows the user, for example,
to select, rename or add options if they don't see what they want in
the list.

Userform B can also, in some cases, invoke another instance of itself
in the case where the option they want is already in a predfined list.

The problem I have is that, given that the commandbar popup onaction
module can only be a general module (?) I cannot tell which instance
of userform B I am talking to.

My addin will eventually become a COM addin, hopefully, so I do not
want to link anything to a workbook or sheet.

Any help or ideas would be gratefully received.


I think I've got it - I had to save a reference to the userform that
invoked the commandbar popup at the time I create the commandbar
itself - then in the commandbar onaction I pick up the saved userform
reference and use that as the object base.