Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Add drop shadow to cells

I am using a recorded a macro that loops through a series of sheets and adds a shadow effect to a cluster of cells, say B5:G8 and it works fine. This code follows:

ActiveSheet.Shapes.AddShape(msoShapeRectangle, 1.4, 40.6, 568.8, 51.3).Select
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Shadow.Obscured = msoTrue
Selection.ShapeRange.Shadow.Type = msoShadow14

The problem is, if the column widths change from one sheet to the next (and they do) then the drop shadow is out of line on subsequent sheets.

How can I get the drop shadow to apply to a range address rather than the sheet coordinates (pixels?) recorded?

Your example code would be most helpful. Thanks in advance.

This only needs to run once per sheet.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Add drop shadow to cells

Maybe this

ActiveSheet.Shapes.AddShape(msoShapeRectangle, Range("B5").Left, Range("B5").Top, _
Range("B5:g8").Width, Range("B5:b8").Height).Select
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Shadow.Obscured = msoTrue
Selection.ShapeRange.Shadow.Type = msoShadow14


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"liner" wrote in message ...
I am using a recorded a macro that loops through a series of sheets and adds a shadow effect to a cluster of cells, say B5:G8

and it works fine. This code follows:

ActiveSheet.Shapes.AddShape(msoShapeRectangle, 1.4, 40.6, 568.8, 51.3).Select
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Shadow.Obscured = msoTrue
Selection.ShapeRange.Shadow.Type = msoShadow14

The problem is, if the column widths change from one sheet to the next (and they do) then the drop shadow is out of line on

subsequent sheets.

How can I get the drop shadow to apply to a range address rather than the sheet coordinates (pixels?) recorded?

Your example code would be most helpful. Thanks in advance.

This only needs to run once per sheet.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Add drop shadow to cells

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
how do i add shadow effects to cells in excel? alistair Excel Discussion (Misc queries) 2 April 7th 23 12:24 PM
how can I add a transparent shadow over cells on an excel sheet? blasttt Excel Discussion (Misc queries) 2 December 5th 07 04:36 PM
Excel 2007: Cell border drop shadow Robin Blackwell Excel Discussion (Misc queries) 2 November 20th 07 04:49 AM
Drop Shadow around Cells - where is it in Excel 2007? dee Excel Discussion (Misc queries) 0 June 11th 07 10:43 PM
Shadow to cell how? Anand vijay Excel Worksheet Functions 1 January 18th 07 01:21 PM


All times are GMT +1. The time now is 01:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"