![]() |
#2
|
|||
|
|||
![]()
You need to make some objects to achieve this. The Set word will do this after you dim it. The code below will do what you are looking for.
Code:
Sub Button1_Click() Dim ws As Worksheet, AngleShape(1 To 3) As Shape, x As Byte 'Set up the references Set ws = ThisWorkbook.ActiveSheet Set AngleShape(1) = ws.Shapes("Ship") Set AngleShape(2) = ws.Shapes("Wind") Set AngleShape(3) = ws.Shapes("Apparent") 'Perform the calculation Calculate 'Perform the rotation for the above shapes For x = 1 To 3 AngleShape(x).Rotation = ws.Cells(2, x) Next x End Sub Code:
Set AngleShape = (ws.Shapes("Ship"), ws.Shapes("Wind"), ws.Shapes("Apparent")) Code:
Set AngleShape = Array(ws.Shapes("Ship"), ws.Shapes("Wind"), ws.Shapes("Apparent")) Code:
Set AngleShape() = Array(ws.Shapes("Ship"), ws.Shapes("Wind"), ws.Shapes("Apparent")) Thanks Last edited by excelledsoftware; 09-05-2014 at 12:48 PM. Reason: forgot content |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
preetidb | PowerPoint | 4 | 12-30-2013 03:22 PM |
color change for same shape | ajkiran | PowerPoint | 1 | 11-10-2012 07:41 AM |
![]() |
excelledsoftware | PowerPoint | 3 | 03-01-2012 06:59 PM |
![]() |
shinyjellicent12321 | PowerPoint | 1 | 02-19-2012 11:43 AM |
Motion Paths with Rotation | PBone | PowerPoint | 4 | 01-13-2011 11:59 AM |