PC Review


Reply
Thread Tools Rate Thread

A) 2 Contiguous Popups B) The 'reverse' of .onaction

 
 
=?Utf-8?B?TmVhbCBaaW1t?=
Guest
Posts: n/a
 
      9th Jul 2007
Hi All,
I have Walkenbach's 2002 VBA book and am STARTING to learn about Toolbars
and Menus. I've built a menu using his method of putting the variable data
into a worksheet, ws, with a macro to add the controls reading the ws. What
I don't see; I looked thru all of the standard Excel Menus, is two popups "in
a row". See diagram below for popup 2 and 2.1
A)
Menu
popup 1 a series of "popup 1's" is what the JWalk code does.
sub item a
sub item b
popup 2
popup 2.1
sub item c
sub item d
popup 2.2
sub item e
sub item f

Is the above possible ? (I don't need code now, but without something like
the above; the Menu design for the app I'm building will be more difficult.)

Related to the above is:

B) In my playing around, I've started a macro via the onaction = "macname"
capability, and in a prior posting I've received advice NOT to pass arguments
via
onaction = and I'm gonna follow the advice. I've put some data into the .Tag
property, BUT then I realized:
How does a macro "know" which control button triggered it?
Is there some kind of event that will let you back track to the .Tag
info ?

Is the 'normal' way to do this: to attach a different macro name for
each control button with onaction= ? That would give me what I need, but it
seems cumbersome.

Thanks,
Neal Z.


--
Neal Z
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      9th Jul 2007

"Neal Zimm" <(E-Mail Removed)> wrote in message
news:6254AA90-C4D8-4D43-92E5-(E-Mail Removed)...
> Hi All,
> I have Walkenbach's 2002 VBA book and am STARTING to learn about Toolbars
> and Menus. I've built a menu using his method of putting the variable data
> into a worksheet, ws, with a macro to add the controls reading the ws.
> What
> I don't see; I looked thru all of the standard Excel Menus, is two popups
> "in
> a row". See diagram below for popup 2 and 2.1
> A)
> Menu
> popup 1 a series of "popup 1's" is what the JWalk code does.
> sub item a
> sub item b
> popup 2
> popup 2.1
> sub item c
> sub item d
> popup 2.2
> sub item e
> sub item f
>
> Is the above possible ? (I don't need code now, but without something like
> the above; the Menu design for the app I'm building will be more
> difficult.)



It certainly is possible. A popup with sub-items is of type msoControlPopup,
whereas the actual foing control is of type msoControlButton.

I don't have John's code in front of me, but as I recall he uses a level
index, so you will need to add new levels and code to accomodate these.


> Related to the above is:
>
> B) In my playing around, I've started a macro via the onaction = "macname"
> capability, and in a prior posting I've received advice NOT to pass
> arguments
> via
> onaction = and I'm gonna follow the advice. I've put some data into the
> .Tag
> property, BUT then I realized:
> How does a macro "know" which control button triggered it?
> Is there some kind of event that will let you back track to the .Tag
> info ?
>
> Is the 'normal' way to do this: to attach a different macro name for
> each control button with onaction= ? That would give me what I need, but
> it
> seems cumbersome.



No, as I showed you, you can use a single macro and test the property from
within there. When you click a control, the assigned macro is called. You
test that control's properties using Application.CommandBars.ActionControl,
whereby VBA holds details of the control triggered. for instance

If Application.CommandBars.ActionControl.Tag ="Neal" then
'etc.


 
Reply With Quote
 
=?Utf-8?B?TmVhbCBaaW1t?=
Guest
Posts: n/a
 
      9th Jul 2007
Hi Again,
I was hoping you'd grab this one.
There's a big email I sent to you re: the Addin.
I actually grabbed a code sample you posted here a while ago on the
indented popups. I'll be working with it later.

My eyes are failing me, too many hours, it's the .ActionControl that's the
key. I already have the data I need in the .Tag property. NOW the discussion
on NOT
passing params in .onaction makes perfect sense.

Thanks.
--
Neal Z


"Bob Phillips" wrote:

>
> "Neal Zimm" <(E-Mail Removed)> wrote in message
> news:6254AA90-C4D8-4D43-92E5-(E-Mail Removed)...
> > Hi All,
> > I have Walkenbach's 2002 VBA book and am STARTING to learn about Toolbars
> > and Menus. I've built a menu using his method of putting the variable data
> > into a worksheet, ws, with a macro to add the controls reading the ws.
> > What
> > I don't see; I looked thru all of the standard Excel Menus, is two popups
> > "in
> > a row". See diagram below for popup 2 and 2.1
> > A)
> > Menu
> > popup 1 a series of "popup 1's" is what the JWalk code does.
> > sub item a
> > sub item b
> > popup 2
> > popup 2.1
> > sub item c
> > sub item d
> > popup 2.2
> > sub item e
> > sub item f
> >
> > Is the above possible ? (I don't need code now, but without something like
> > the above; the Menu design for the app I'm building will be more
> > difficult.)

>
>
> It certainly is possible. A popup with sub-items is of type msoControlPopup,
> whereas the actual foing control is of type msoControlButton.
>
> I don't have John's code in front of me, but as I recall he uses a level
> index, so you will need to add new levels and code to accomodate these.
>
>
> > Related to the above is:
> >
> > B) In my playing around, I've started a macro via the onaction = "macname"
> > capability, and in a prior posting I've received advice NOT to pass
> > arguments
> > via
> > onaction = and I'm gonna follow the advice. I've put some data into the
> > .Tag
> > property, BUT then I realized:
> > How does a macro "know" which control button triggered it?
> > Is there some kind of event that will let you back track to the .Tag
> > info ?
> >
> > Is the 'normal' way to do this: to attach a different macro name for
> > each control button with onaction= ? That would give me what I need, but
> > it
> > seems cumbersome.

>
>
> No, as I showed you, you can use a single macro and test the property from
> within there. When you click a control, the assigned macro is called. You
> test that control's properties using Application.CommandBars.ActionControl,
> whereby VBA holds details of the control triggered. for instance
>
> If Application.CommandBars.ActionControl.Tag ="Neal" then
> 'etc.
>
>
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      9th Jul 2007
Neal,

Saw the email, and have responded.

I've looked at John's code. Do you need an amended version for 4 levels?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Neal Zimm" <(E-Mail Removed)> wrote in message
news:EDEA6D83-2F10-4103-B184-(E-Mail Removed)...
> Hi Again,
> I was hoping you'd grab this one.
> There's a big email I sent to you re: the Addin.
> I actually grabbed a code sample you posted here a while ago on the
> indented popups. I'll be working with it later.
>
> My eyes are failing me, too many hours, it's the .ActionControl that's
> the
> key. I already have the data I need in the .Tag property. NOW the
> discussion
> on NOT
> passing params in .onaction makes perfect sense.
>
> Thanks.
> --
> Neal Z
>
>
> "Bob Phillips" wrote:
>
>>
>> "Neal Zimm" <(E-Mail Removed)> wrote in message
>> news:6254AA90-C4D8-4D43-92E5-(E-Mail Removed)...
>> > Hi All,
>> > I have Walkenbach's 2002 VBA book and am STARTING to learn about
>> > Toolbars
>> > and Menus. I've built a menu using his method of putting the variable
>> > data
>> > into a worksheet, ws, with a macro to add the controls reading the ws.
>> > What
>> > I don't see; I looked thru all of the standard Excel Menus, is two
>> > popups
>> > "in
>> > a row". See diagram below for popup 2 and 2.1
>> > A)
>> > Menu
>> > popup 1 a series of "popup 1's" is what the JWalk code does.
>> > sub item a
>> > sub item b
>> > popup 2
>> > popup 2.1
>> > sub item c
>> > sub item d
>> > popup 2.2
>> > sub item e
>> > sub item f
>> >
>> > Is the above possible ? (I don't need code now, but without something
>> > like
>> > the above; the Menu design for the app I'm building will be more
>> > difficult.)

>>
>>
>> It certainly is possible. A popup with sub-items is of type
>> msoControlPopup,
>> whereas the actual foing control is of type msoControlButton.
>>
>> I don't have John's code in front of me, but as I recall he uses a level
>> index, so you will need to add new levels and code to accomodate these.
>>
>>
>> > Related to the above is:
>> >
>> > B) In my playing around, I've started a macro via the onaction =
>> > "macname"
>> > capability, and in a prior posting I've received advice NOT to pass
>> > arguments
>> > via
>> > onaction = and I'm gonna follow the advice. I've put some data into the
>> > .Tag
>> > property, BUT then I realized:
>> > How does a macro "know" which control button triggered it?
>> > Is there some kind of event that will let you back track to the .Tag
>> > info ?
>> >
>> > Is the 'normal' way to do this: to attach a different macro name for
>> > each control button with onaction= ? That would give me what I need,
>> > but
>> > it
>> > seems cumbersome.

>>
>>
>> No, as I showed you, you can use a single macro and test the property
>> from
>> within there. When you click a control, the assigned macro is called. You
>> test that control's properties using
>> Application.CommandBars.ActionControl,
>> whereby VBA holds details of the control triggered. for instance
>>
>> If Application.CommandBars.ActionControl.Tag ="Neal" then
>> 'etc.
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popups not working, even if Popups are allowed in IE Moe Sisko Microsoft ASP .NET 1 4th Aug 2008 04:33 PM
Copy and Paste LAST ROW of data: non-contiguous Row, contiguous Column Sam via OfficeKB.com Microsoft Excel Programming 8 5th Nov 2007 07:18 PM
Application Information Popups (ie NOT internet popups) =?Utf-8?B?TGVvbiBQT0xBSw==?= Windows XP New Users 0 19th Jun 2006 08:38 AM
Re: popups advertising to stop popups Shenan T. Stanley Windows XP Security 0 12th Jul 2003 10:36 PM
Brown popups offering to give programs to block popups George A Windsor Windows XP Security 1 10th Jul 2003 07:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:29 PM.