I'm new to vba and I'm in a situation where I've to assign an algebraic formula that contains a variable (i for eg.) to another variable (say a). How do i do that? I'm probably not using the right syntax. I've searched this everywhere but couldn't find relevant answers. Please help. my code is
Dim i As Long, a As Long
For i = 1 To 30
a = SIN(RADIANS(i))
With ActiveSheet.Shapes("sketch_1").Duplicate
.IncrementTop i
.IncrementRotation a
End With
Next i
Is this right? Is there also a way to directly enter the formula next to .IncrementRotation as opposed to having seperate variable "a" to do this job?