Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default shapes on a sheet

I have several rectangles that I use as buttons on my
spreadsheet to kick off certain macros.

Can I enable and disable these rectangles like you can do
with buttons on a form?

Any help with the syntax would be appreciated. Thanks...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default shapes on a sheet

A rectangle does have an enabled property, but it doesn't seem to do much.
You could, however, set it with your code, then have the click event check
the value of that property

Sub Rectangle_click()
sName = Application.Caller
Set rect = ActiveSheet.Rectangles(sName)
If rect.Enabled Then
MsgBox rect.Name & ", Yes I am enabled"
else
msgbox "I am not able to help at this time"
End If
End Sub


activesheet.shapes(1).controlformat.Enabled = false
activesheet.shapes("Rectangle 1").controlformat.Enabled = false
activsheet.Rectangles("Rectangle 1").Enabled = False


--
Regards,
Tom Ogilvy


"JT" wrote in message
...
I have several rectangles that I use as buttons on my
spreadsheet to kick off certain macros.

Can I enable and disable these rectangles like you can do
with buttons on a form?

Any help with the syntax would be appreciated. Thanks...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default shapes on a sheet

Hi,

you can use the sheet protection and protect the objects only. It will
allow you doing everything you want in the sheet but won't allow
grabbing the objects.

Regards

JT a écrit :
I have several rectangles that I use as buttons on my
spreadsheet to kick off certain macros.

Can I enable and disable these rectangles like you can do
with buttons on a form?

Any help with the syntax would be appreciated. Thanks...

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
Problem with creating numerous shapes on a single sheet Youpicola Excel Programming 0 August 12th 04 01:08 PM


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