When I run the following code in an excel that has a reference to the design library it does not work. It ran on computers with 2017 installed but creates errors after making the rectangle in a computer with X5
SWOrigin(0) = PlateCorner_2(0) + SpacingSWOrigin(1) = PlateCorner_1(1) - (3 - QtySW) * (Width + Spacing)SWCorner_1(0) = SWOrigin(0)SWCorner_1(1) = SWOrigin(1)SWCorner_2(0) = SWCorner_1(0) + HeightSWCorner_2(1) = SWOrigin(1) - WidthHoleCoords(0) = SWCorner_2(1) + 5 / 32HoleCoords(1) = SWCorner_1(1) - 5 / 32Set Label = CorelApp.ActiveLayer.CreateRectangle(SWCorner_1(0), SWCorner_1(1), SWCorner_2(0), SWCorner_2(1))With Label .Rectangle.CornerType = cdrCornerTypeRound .Rectangle.RelativeCornerScaling = True .Fill.ApplyNoFillEnd WithSet Hole_1 = CorelApp.ActiveLayer.CreateEllipse2(0, HoleCoords(0), Radius, Radius)Hole_1.Fill.ApplyNoFillSet Hole_2 = ActiveLayer.CreateEllipse2(0, HoleCoords(1), Radius, Radius)Hole_2.Fill.ApplyNoFill
The error highlights the Set Hole_1 = CorelApp.ActiveLayer.CreateEllipse2(0, HoleCoords(0), Radius, Radius) line