Kalle1202
03-27-2018, 09:55 AM
Hey everybody,
Iam just starting to learn VBA programming in Excel.
All I want is to create a big circle and some small circles in excel. The big circle has to be in a certain position.
My excel sheet looks like this:
21935
My code looks like this:
Private Sub CommandButton1_Click()
Dim diam
diam = Range("K8").Value * 10
ActiveSheet.Shapes.AddShape msoShapeOval, 50, 50, diam, diam
End Sub
The code creates the big circle but it is in the wrong position as you can see in the picture. I would like to have it somewhere close to I25. Then by clicking on the command button I also want to create 7 more small circles with a diameter of 5.922. (please see also the picture cell K17 and K25). The position of the small circles is not important.
Thank you guys so much
Iam just starting to learn VBA programming in Excel.
All I want is to create a big circle and some small circles in excel. The big circle has to be in a certain position.
My excel sheet looks like this:
21935
My code looks like this:
Private Sub CommandButton1_Click()
Dim diam
diam = Range("K8").Value * 10
ActiveSheet.Shapes.AddShape msoShapeOval, 50, 50, diam, diam
End Sub
The code creates the big circle but it is in the wrong position as you can see in the picture. I would like to have it somewhere close to I25. Then by clicking on the command button I also want to create 7 more small circles with a diameter of 5.922. (please see also the picture cell K17 and K25). The position of the small circles is not important.
Thank you guys so much