Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Enabled Property of Shapes?

Hello -

I have a worksheet with a button on it that I called "undoButton". How
can I now set the Enabled property of this button from a macro?

I did the following and it "almost" works ...

ActiveSheet.Shapes("undoButton").Select
Selection.Enabled = False

The only problem is that it selects the button which will be confusing
for the user. I then tried

ActiveSheet.Shapes("undoButton").Enabled = false

but that wouldn't work.

How can I access the properties of the button and change them? The
ActiveSheet.Shapes("undoButton").Locked = true worked ... why not the
Selected?

Thanks!
Joe

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Enabled Property of Shapes?

try

Activesheet.Buttons("Undobutton").Enabled = False

assumes a button from the forms toolbar.

--
Regards,
Tom Ogilvy


"Joe HM" wrote in message
oups.com...
Hello -

I have a worksheet with a button on it that I called "undoButton". How
can I now set the Enabled property of this button from a macro?

I did the following and it "almost" works ...

ActiveSheet.Shapes("undoButton").Select
Selection.Enabled = False

The only problem is that it selects the button which will be confusing
for the user. I then tried

ActiveSheet.Shapes("undoButton").Enabled = false

but that wouldn't work.

How can I access the properties of the button and change them? The
ActiveSheet.Shapes("undoButton").Locked = true worked ... why not the
Selected?

Thanks!
Joe



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Enabled Property of Shapes?

Try this:
ActiveSheet.Shapes("undoButton").ControlFormat.Ena bled = false
Excel recognizes the control (i.e. button) when you choose the "Selection",
but the Shape itself is just a "container" for the control and has no Enabled
property of its own.

"Joe HM" wrote:

Hello -

I have a worksheet with a button on it that I called "undoButton". How
can I now set the Enabled property of this button from a macro?

I did the following and it "almost" works ...

ActiveSheet.Shapes("undoButton").Select
Selection.Enabled = False

The only problem is that it selects the button which will be confusing
for the user. I then tried

ActiveSheet.Shapes("undoButton").Enabled = false

but that wouldn't work.

How can I access the properties of the button and change them? The
ActiveSheet.Shapes("undoButton").Locked = true worked ... why not the
Selected?

Thanks!
Joe


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Enabled Property of Shapes?

Great ... Thanks so much!

Joe

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
excel document with shapes on it but the shapes do not print [email protected] Excel Worksheet Functions 2 October 22nd 09 06:17 PM
Naming Auto Shapes and Creating new Shapes AL2000 Excel Discussion (Misc queries) 3 September 10th 07 04:12 AM
When drawing shapes in excel the shapes keep disappearing Tape Excel Discussion (Misc queries) 1 October 6th 06 04:23 PM
How can i get more 3D shapes for Auto shapes in excel? Ajey Excel Discussion (Misc queries) 0 March 3rd 05 09:53 AM
How can i get more 3D shapes for Auto shapes in excel? Ajey Excel Discussion (Misc queries) 0 March 3rd 05 09:53 AM


All times are GMT +1. The time now is 04:35 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"