Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Buttons Object

What are the methods and properties associated with the Buttons object?
--
Gary''s Student - gsnu2007xx
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Buttons Object

"Gary''s Student" wrote in message
...
What are the methods and properties associated with the Buttons object?


It's a collection, actually, and you can see all of its properties and
methods in the Object Browser, you just need to unhide it. Bring up the
Object Browser and right-click anywhere on it. Select "Show hidden members"
from the shortcut menu. The Buttons collection, Button object and lots of
other legacy stuff will now be visible in the Object Browser for your
examination. Note this setting is not persistent across Excel sessions, so
you'll need to make it again if you restart Excel.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Buttons Object

The idea in XL97 seemed to be to supersede the drawing-objects level and its
sub-type collections with Shapes. Fortunately that never quite happened,
however it means there's not much in Help. Button(s) is a sub-type that
refers to Buttons applied from the Forms toolbar.

Dim btns As Buttons
Dim btn As Button

start typing "btn." and/or "btns." for the intellisense.

Could get more by putting some buttons on the sheet, run this
Set btns = ActiveSheet.Buttons
Set btn = btns(1)
Stop ' look in Locals, Alt-v,s

You can also search Button(s) in Object browser F2. On the rt-click menu
tick Show hidden members.

Most of the methods and properties that you'll quickly see from any of the
above three methods are pretty obvious.

Working with these types of objects is often faster than working with the
Shapes collection, and for some thing's less code. Small point, although
you can do For Each btn in btns, it's a bit more reliable to loop by index
in rare situations.

Regards,
Peter T


"Gary''s Student" wrote in message
...
What are the methods and properties associated with the Buttons object?
--
Gary''s Student - gsnu2007xx



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Buttons Object


Do "Buttons" still function in XL2007?
See the post "Button Text Problem" by AndyM in this group on May 15 2008.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware



(Excel Add-ins / Excel Programming)
"Gary''s Student"

wrote in message
What are the methods and properties associated with the Buttons object?
--
Gary''s Student - gsnu2007xx
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Buttons Object

Hi Jim,

All of the Forms controls still work fine in Excel 2007 as far as I
know. I suspect the problem in the post you referenced was the poster was
selecting the button and then trying to operate on the selection instead of
going straight through the object model. Because of the differences in the
way objects drawn on worksheets has changed over time, code that does this
could work in earlier versions of Excel and fail in later versions.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Jim Cone" wrote in message
...

Do "Buttons" still function in XL2007?
See the post "Button Text Problem" by AndyM in this group on May 15 2008.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware



(Excel Add-ins / Excel Programming)
"Gary''s Student"

wrote in message
What are the methods and properties associated with the Buttons object?
--
Gary''s Student - gsnu2007xx





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Buttons Object

Rob,
Another reason not to use "select".
Thanks for the info.
Jim Cone


"Rob Bovey"
wrote in message
Hi Jim,
All of the Forms controls still work fine in Excel 2007 as far as I
know. I suspect the problem in the post you referenced was the poster was
selecting the button and then trying to operate on the selection instead of
going straight through the object model. Because of the differences in the
way objects drawn on worksheets has changed over time, code that does this
could work in earlier versions of Excel and fail in later versions.
--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/



"Jim Cone"
wrote in message
Do "Buttons" still function in XL2007?
See the post "Button Text Problem" by AndyM in this group on May 15 2008.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware





(Excel Add-ins / Excel Programming)
"Gary''s Student"

wrote in message
What are the methods and properties associated with the Buttons object?
--
Gary''s Student - gsnu2007xx



Reply
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
Changing Control Object Name( command buttons etc ) from VBA code TONY Excel Programming 1 November 29th 07 06:40 AM
Form buttons vs. ActiveX Buttons GeorgeJ Excel Discussion (Misc queries) 3 August 11th 07 09:02 PM
have toggle buttons but everytime print preview buttons move TinSandhu Excel Discussion (Misc queries) 1 October 11th 06 02:57 PM
Disable Object buttons, based on value of other object buttons jeffbert Excel Programming 2 June 2nd 06 04:35 PM
Programmatically adding buttons to a worksheet (Shape Object) Phil Excel Programming 3 January 26th 04 03:51 PM


All times are GMT +1. The time now is 05:59 PM.

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

About Us

"It's about Microsoft Excel"