我正在尝试使用PowerPoint中的VBA调整形状(正方形),同时单击正方形的每个顶点中的4个圆之一 . 但是当我将它调整到鼠标的位置时,它只能在正方形的右下顶点工作 .

我希望它在上顶点放大,在左侧顶点放置 . 因为它只是右下角的尺寸 . 我试过弄乱形状的Top属性和许多代码,但是没有它们工作 .

EDIT: 我可以使用ScaleHeight和ScaleWidth属性吗?如果是,那么你可以帮助我吗,因为这个属性令人困惑,因为我必须使用因素......

这是我尝试的最后一个代码:

Sub resizeshp_topright3()
Dim llCoord As POINTAPI
GetCursorPos llCoord
Shapes("a").TextFrame.TextRange.Text = Shapes("shp").Height

Shapes("shp").Width = (llCoord.Xcoord / 1.417323) - Val(Replace(Shapes("shp").Left, ",", "."))
Shapes("shp").Top = (llCoord.Ycoord / 1.417323)
Shapes("shp").Height = (llCoord.Ycoord / 1.417323) - Val(Replace(Shapes("shp").Top, ",", "."))
End Sub