PC Review


Reply
Thread Tools Rate Thread

autoshapes - identification and property change

 
 
Marcin Peciak
Guest
Posts: n/a
 
      14th Apr 2009
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 With Quote
 
 
 
 
OssieMac
Guest
Posts: n/a
 
      15th Apr 2009
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change Computer Identification RanMan Windows XP Networking 5 4th May 2011 04:03 PM
Change color of multiple autoshapes T-bone Microsoft Excel Discussion 4 18th Apr 2008 02:21 AM
change all the autoshapes Max Bialystock Microsoft Excel Programming 2 6th Sep 2006 03:01 AM
Autoshapes name change macro =?Utf-8?B?TGFycnk=?= Microsoft Excel Worksheet Functions 1 18th Oct 2004 10:44 PM
Change XP Product Identification (PID) Marco Anselmo Windows XP Security 1 8th Oct 2003 01:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:52 PM.