Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Buttons Object
What are the methods and properties associated with the Buttons object?
-- Gary''s Student - gsnu2007xx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing Control Object Name( command buttons etc ) from VBA code | Excel Programming | |||
Form buttons vs. ActiveX Buttons | Excel Discussion (Misc queries) | |||
have toggle buttons but everytime print preview buttons move | Excel Discussion (Misc queries) | |||
Disable Object buttons, based on value of other object buttons | Excel Programming | |||
Programmatically adding buttons to a worksheet (Shape Object) | Excel Programming |