Re: Buttons - Select All ?
From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 01/03/05
- Next message: quartz: "Sort sheets using both alpha and numeric?"
- Previous message: JIM.H.: "Q:*** to file"
- In reply to: Peter T: "Re: Buttons - Select All ?"
- Next in thread: Peter T: "Re: Buttons - Select All ?"
- Reply: Peter T: "Re: Buttons - Select All ?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 3 Jan 2005 15:28:48 -0500
> There must be another word to cover this scenario,
My post in this type of situation might have been something like.
To add to Chips excellent advice regarding commandbuttons from the controls
toolbox toolbar, you may actually be using buttons from the forms toolbar.
If so, delightedly, you can do mass changes using the buttons collection of
the ***. . . .
--
Regards,
Tom Ogilvy
"Peter T" <peter_t@discussions> wrote in message
news:%23375u1Z8EHA.2156@TK2MSFTNGP10.phx.gbl...
>
> "Tom Ogilvy" <twogilvy@msn.com> wrote in message
> news:eznl35S8EHA.1524@TK2MSFTNGP09.phx.gbl...
> > I think you meant
> > Dim oOLEs As OLEObjects
> > Set oOLEs = Active***.OLEObjects
> > oOLEs.Select
> > select.Delete
> >
> > Otherwise, not sure why you introduced oOLEs
>
> I should have clarified they were ad hoc example lines, not intended as a
> complete routine. Paraphrasing, the OP mentioned delete all buttons in a
> single statement, that would not require setting a reference. But he also
> included "change their properties as a group", hence example with a
> reference.
>
> > Also, in your original response, you said "Very tentitively" as if you
> were
> > contradicting Chip. I just clarified for the OP that Chip was speaking
of
> > commandbuttons and not buttons from the Forms toolbar.
>
> I can't imagine ever "contradicting" Chip, or you for that matter <g>. The
> reverse - very likely! (and welcomed). But on this rare occasion I didn't
> think Chip's answer covered the unknown possibility the OP was talking
about
> Forms buttons. There must be another word to cover this scenario, but it's
> not "contradict". In hindsight, and as the OP has since confirmed he did
> indeed mean "Forms", I might have been overly "tentative".
>
> >Shame on the OP for not being more specific <g>.
>
> (Forms or Controls) I know you meant this light heartedly but I have some
> sympathy. Many are understandably confused by the two sets, or unaware of
> the distinction. I'm sure if MS were to design a brand new application
they
> would not be replicated. It's just evolved this way and so I guess they
are
> there in perpetuity, to confuse generations to come!
>
> Regards,
> Peter T
>
> >
> > "Peter T" <peter_t@discussions> wrote in message
> > news:%238cMxvM8EHA.3820@TK2MSFTNGP11.phx.gbl...
> > > > Chip was speaking of controls from the control toolbox toolbar.
> > >
> > > Yes I realize.
> > >
> > > The OP did not specify what sort of buttons, so I thought 60/40 he
might
> > > have wanted to reference all Forms' buttons in a statement, as he put
> it.
> > >
> > > I suppose were his buttons Controls, he could also reference all
> > OLEObjects
> > > in one go:
> > >
> > > Dim oOLEs As OLEObjects
> > > Set oOLEs = Active***.OLEObjects
> > > oOLEs.Select
> > > Active***.OLEObjects.Delete
> > >
> > > Of course not specific to CommandButtons, limited and could include
> > > something unintended.
> > >
> > > Regards,
> > > Peter T
> > >
> > > "Tom Ogilvy" <twogilvy@msn.com> wrote in message
> > > news:OZIBF$E8EHA.2452@TK2MSFTNGP14.phx.gbl...
> > > > Chip was speaking of controls from the control toolbox toolbar.
> > > >
> > > > The buttons collection for buttons from the forms toolbar does have
a
> > > delete
> > > > method
> > > >
> > > > --
> > > > Regards,
> > > > Tom Ogilvy
> > > >
> > > >
> > > > "Peter T" <peter_t@discussions> wrote in message
> > > > news:u0bNwmE8EHA.3504@TK2MSFTNGP12.phx.gbl...
> > > > > Chip & Emory,
> > > > >
> > > > > Very tentitively - following seems to work for buttons from the
> Forms
> > > > menu:
> > > > >
> > > > > Sub test()
> > > > > Dim bts As Buttons
> > > > >
> > > > > 'Active***.Buttons.Font.ColorIndex = 3
> > > > >
> > > > > Set bts = Active***.Buttons
> > > > > bts.OnAction = "MyMacro"
> > > > > bts.Copy
> > > > > Worksheets("Sheet2").Paste
> > > > > Application.CutCopyMode = False
> > > > > bts.Delete
> > > > > End Sub
> > > > >
> > > > > Sub MyMacro()
> > > > > MsgBox Application.Caller
> > > > > End Sub
> > > > >
> > > > > Regards,
> > > > > Peter T
> > > > >
> > > > > "Chip Pearson" <chip@cpearson.com> wrote in message
> > > > > news:eMVutPE8EHA.1400@TK2MSFTNGP11.phx.gbl...
> > > > > > No, there is no built in way to select all the controls, or all
> > > > > > the controls of a given type. You have to select them manually
> > > > > > and change their properties as a group.
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Cordially,
> > > > > > Chip Pearson
> > > > > > Microsoft MVP - Excel
> > > > > > Pearson Software Consulting, LLC
> > > > > > www.cpearson.com
> > > > > >
> > > > > >
> > > > > > "Emory Richter" <emory@moonlight.com> wrote in message
> > > > > > news:MPG.1c40ca214f57b244989691@msnews.microsoft.com...
> > > > > > > Is there a statement to select *all* the buttons on a
work***
> > > > > > > in order to delete them or change their properties as a group?
> > > > > > >
> > > > > > > Thank you,
> > > > > > > Emory
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: quartz: "Sort sheets using both alpha and numeric?"
- Previous message: JIM.H.: "Q:*** to file"
- In reply to: Peter T: "Re: Buttons - Select All ?"
- Next in thread: Peter T: "Re: Buttons - Select All ?"
- Reply: Peter T: "Re: Buttons - Select All ?"
- Messages sorted by: [ date ] [ thread ]