Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default autoshapes - identification and property change

Hi All,

I have theree rectangles in a spreadsheet, each calls a cell in order to
display a value (i.e =A1).
I tried to change object colors, size based on the values displayed - for
example - to scale size of the object.

How to do this? I used macro recorder, but I cant get into object
properties - as the editor, didnt show the drawing objects in the code?

Many thanks,
Marcin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default autoshapes - identification and property change

Hi Marcin,

The following should help. Note the comments and also that some of the lines
of code are commented out and are there to show alternatives and additional
code that might be helpful in the example.


With ActiveSheet.Shapes("Rectangle 1")
.Width = 50
.Height = 20

'Use following if width and height in cell values
'.Width = ActiveSheet.Range("A1")
'.Height = ActiveSheet.Range("A2")

'Lookup RGB function for more colors
.Fill.ForeColor.RGB = RGB(255, 255, 0) 'Yellow
'.Fill.ForeColor.RGB = RGB(0, 0, 255) 'Blue

'Alternative color code.
'Test SchemeColors for required color.
'.Fill.ForeColor.SchemeColor = 1 'White
'.Fill.ForeColor.SchemeColor = 0 'Black

'Scales the shape (Numbers less than 1 reduce; greater than 1 enlarge)
'.ScaleWidth 0.73, msoFalse, msoScaleFromTopLeft
'.ScaleHeight 0.57, msoFalse, msoScaleFromTopLeft

End With


--
Regards,

OssieMac


"Marcin Peciak" wrote:

Hi All,

I have theree rectangles in a spreadsheet, each calls a cell in order to
display a value (i.e =A1).
I tried to change object colors, size based on the values displayed - for
example - to scale size of the object.

How to do this? I used macro recorder, but I cant get into object
properties - as the editor, didnt show the drawing objects in the code?

Many thanks,
Marcin

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
How do I change an AutoShapes Callout line gap ? nelli82669 Charts and Charting in Excel 0 July 31st 09 01:49 PM
How do you change the default text alignment for Excel autoshapes bk2001 Excel Discussion (Misc queries) 1 May 18th 07 03:22 PM
change all the autoshapes Max Bialystock[_2_] Excel Programming 2 September 6th 06 03:01 AM
'On change' property matpj[_66_] Excel Programming 4 May 16th 06 02:23 PM
DrawingObjects/AutoShapes' .OnAction property in DialogSheets BizMark Excel Discussion (Misc queries) 0 October 12th 05 12:40 PM


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