[Webinar] Streamline your web hosting managementRegister Today

x
Solved

# Defining the five parameters in a Chart Series Shadow

Posted on 2013-05-30
Medium Priority
1,317 Views
I have a code that will create a shadow on all the series collections in my chart, but the only parameter I can control is blur. I'm looking to get the first shadow preset which has the settings below. (More or less. Blur = 4 pt didn't work but Blur = 25 did)

So what would be the proper syntax to perfectly emulate the Excel 2007 default shadow preset?

``````   For i = 4 To 8
Nm = Cells(i, 1).Value
'ActiveChart.SeriesCollection(Nm).Format.Shadow.Angle = 45 (w/ degrees symbol)
Next i
``````
Thanks!
John
0
Question by:gabrielPennyback

LVL 54

Accepted Solution

Rgonzo1971 earned 1000 total points
ID: 39209983
Pls try

With a little help from Pythagoras:  .OffsetX and OffsetY = 2.1213203436 with a distance of 3 and an angle of 45°.
The hypothenuse is 3, that means X and Y are ((3^2)/2)^0.5= 2.1213203436

``````    With Selection.Format.Shadow
.Visible = msoTrue
.Blur = 4
.OffsetX = 2.1213203436
.OffsetY = 2.1213203436
.RotateWithShape = msoFalse
.Transparency = 0.6 ' for 60 Pct
.Size = 100
End With
``````
Regards
0

LVL 17

Assisted Solution

andrewssd3 earned 1000 total points
ID: 39210072
You can directly assign the shadow presets using e.g.
``````s.Format.Shadow.Type = msoShadow22
``````
(where 's' is the chart series). Not sure exactly what preset it is you want, but you can experiment with the different constants
0

LVL 1

Author Closing Comment

ID: 39211595
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
###### Suggested Courses
Course of the Month7 days, 12 hours left to enroll