LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Userform with commandbar popup

On Mar 4, 11:09*am, Neil wrote:
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 popupcommandbarthat 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 thecommandbarpopuponaction
modulecan only be a generalmodule(?) 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 thecommandbarpopup at the time I create thecommandbar
itself - then in thecommandbaronactionI pick up the saved userform
reference and use that as theobjectbase.


OK, I'm still having problems and would appreciate some help.

I have created a class module that displays a treeview within a
userform. The treeview can display several data types. For example,
the user gets presented with a tree of service providers which are
indexed uniquely by name and country. If the user chooses to add a
new service provider, then he will be presented with a second userform
( a second instance of the same userform) that contains a treeview of
the countries they may choose from.

Each instance of the treeview userform creates a commandbar popup that
has awareness of the treeview content, for example, in the first
instance to select, add, rename or delete the service provider name,
and in the second instance to select, add, rename, delete a country.

From what I've understood from this forum and other sources, the
CommandBar Popup OnAction target can only reside in a general module.

So, my original problem still exists - how can I set things up so that
the general OnAction module knows which instance of the treeview
userform to act upon?

One idea, I guess, is to stack the objects that contain the userform
treeviews in a collection and key them on the userform caption - I
guess this is what windows does?

If I could pass the OnAction module a parameter of the parent treeview
userform then it would be much easier.

Anyone have any ideas?

Many thanks......Neil
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SpinControl on PopUp CommandBar ? H.G. Lamy Excel Programming 0 November 28th 09 05:21 PM
popup menu commandbar Edward Excel Programming 2 July 14th 06 07:05 PM
positioning the control on a popup commandbar MVM Excel Programming 3 October 21st 05 07:28 PM
Popup commandbar and Setfocus Greg Wilson Excel Programming 2 September 24th 05 07:26 AM
How to force repaint of popup commandbar? RB Smissaert Excel Programming 0 December 17th 03 01:59 PM


All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"