Solved

# Defining the five parameters in a Chart Series Shadow

Posted on 2013-05-30
1,272 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
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 52

Accepted Solution

Rgonzo1971 earned 250 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 250 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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
###### Suggested Courses
Course of the Month9 days, 16 hours left to enroll