This has got me tearing my hair out.
Can anybody tell me why the following code works fine:
With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 145, 9.75)
.AddNodes msoSegmentLine, msoEditingAuto, 137.25, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 19.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.ConvertToShape.Select
End With
But this code:
With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 145, 9.75)
.AddNodes msoSegmentLine, msoEditingAuto, 140, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 19.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.ConvertToShape.Select
End With
Gives me a 1004 error on the .ConvertToShape.Select line? They are identical except for one number. Do the co-ordinates have to conform to a particular number type for .AddNodes? Any help would be great. I'm using Excel 2000.
Thanks, Craig
Can anybody tell me why the following code works fine:
With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 145, 9.75)
.AddNodes msoSegmentLine, msoEditingAuto, 137.25, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 19.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.ConvertToShape.Select
End With
But this code:
With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 145, 9.75)
.AddNodes msoSegmentLine, msoEditingAuto, 140, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 19.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.AddNodes msoSegmentLine, msoEditingAuto, 145, 9.75
.ConvertToShape.Select
End With
Gives me a 1004 error on the .ConvertToShape.Select line? They are identical except for one number. Do the co-ordinates have to conform to a particular number type for .AddNodes? Any help would be great. I'm using Excel 2000.
Thanks, Craig