Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I change the color Excel Autoshape using VBA?

I'm trying to change the color of an Autoshape I've drawn on a spreadsheet
base on the value of a given cell. Can anybody help me?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default How do I change the color Excel Autoshape using VBA?

hi Jmtricker

how about something like this:

activesheet.shapes("yourshape").color = RGB(Cell1,Cell2,Cell3)

the name and the correct syntax for the shape i would lookup
with recording a macro and then putting it together.
Although when you record a macro, excel always uses select,
you can write it without the select.

If there is any problem you can also post the code the recorded
Macro and we can have a look at it.

hth

Carlo

"jmtricker" wrote:

I'm trying to change the color of an Autoshape I've drawn on a spreadsheet
base on the value of a given cell. Can anybody help me?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default How do I change the color Excel Autoshape using VBA?

Slight correction - the syntax is:

ActiveSheet.Shapes("yourshape").Fill.ForeColor.RGB = RGB(Cell1, Cell2,
Cell3)


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
fill autoshape color with ref cell conditional formatting Julie Excel Worksheet Functions 1 May 16th 08 05:01 PM
autoshape color conditional formating Dennis Collins Excel Discussion (Misc queries) 11 May 16th 08 01:35 PM
change autoshape by condition from a cell value [email protected] Excel Discussion (Misc queries) 7 April 27th 06 01:44 AM
How to change line spacing within an autoshape? pjk1228 Excel Discussion (Misc queries) 0 January 31st 06 06:23 PM
Change AutoShape Text Color in VBA? TheRobsterUK[_2_] Excel Programming 3 October 1st 05 01:35 AM


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