XL2007 - Shapes - Adjust 'Smiley Face'

  • Thread starter michael.beckinsale
  • Start date
M

michael.beckinsale

Hi All,

The code posted below works in XL2003 and changes a 'happy smiley
face' into a 'frowning smiley face'. I know its sad (forgive the pun)
but can anybody tell me how to code this in XL2007?

It really is annoying that the macro recorder does not work for
charts, shapes etc in XL2007.


Sub test_smiley()
Application.ScreenUpdating = True
ActiveSheet.Shapes("Smiley Face 22").Select
Selection.ShapeRange.Adjustments.Item(1) = 0.7181
End Sub

All help gratefully received

Regards

Michael
 
A

Andy Pope

Hi,

looks like the range of adjustment is +/- 0.005

Function Smile()
'
With ActiveSheet.Shapes(1)
.Adjustments.Item(1) = -0.05 ' full frown
DoEvents
MsgBox "Frowning"
.Adjustments.Item(1) = 0.05 ' full smile
End With
'
End Function

Cheers
Andy
 
M

michael.beckinsale

Hi Andy,

Sorry for the delay in replying.

Your solution worked fine. How did you find out what metrics to use ie
+0.05 & -0.05?

I thoroughly inspected the online help and couldn't find anything and
resorted to using the macro recorder in XL2003 to get the code l
posted.


Regards

Michael
 
A

Andy Pope

Hi,

I just experimented some code linked to a slider with the values +/-1
which allowed me to deduce the actual range of values.

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top