Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Disabling all pushbuttons

I added one pushbutton on top of my Sheet1. I then
right-clicked that button and selected "Copy. Next,
I pasted multiple instances of that same button on
Sheet1 up to Sheet12. So, basically, I have many
instances of the same button scattered through
sheets 1 to 12.

What is a good way to disable (and enable) all these
scattered buttons??? Do I need to iterate through
all buttons and disable them one at a time?? How do I
do this?

thank you!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disabling all pushbuttons


For Each sht In Sheets
For Each obj In sht.OLEObjects
ObjectType = TypeName(obj.Object)
If ObjectType = "CommandButton" Then
obj.Enabled = False
End If
Next obj
Next sht


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=170670

Microsoft Office Help

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
editting pushbuttons Jean-Paul De Winter Excel Programming 5 September 24th 06 11:21 PM
disabling cells lak Excel Programming 6 May 17th 04 11:00 PM
Disabling Alt+F11 richard_b2004 Excel Programming 3 May 17th 04 06:32 PM
Disabling Keys Rich Cooper Excel Programming 1 May 14th 04 01:18 AM
Disabling Macros R. SRIKANTH Excel Programming 4 January 11th 04 03:26 PM


All times are GMT +1. The time now is 04:20 AM.

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"