ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

´¡¤J¹Ï¤ù®É¡Aµ¥¤ñ¨Ò©ñ¤j©ÎÁY¤p

Set rngs = Range(Cells(61, 2), Cells(61, 19))
With ActiveSheet.Shapes.AddPicture(i, False, True, rngs.Left, rngs.Top, True, True)
     .LockAspectRatio = msoFalse
     If .Width > rngs.Width - 4 Then .Width = rngs.Width - 4
     If .Height > rngs.Height - 4 Then .Height = rngs.Height - 4
     .Left = rngs.Left + (rngs.Width - .Width) / 2
     .Top = rngs.Top + (rngs.Height - .Height) / 2
End With

TOP

¦^´_ 18# takeshilin88


.LockAspectRatio = True

TOP

¦^´_ 20# takeshilin88


.LockAspectRatio = msoTrue
©Î
.shaperange.LockAspectRatio = msoTrue


¦A¤£¦æªº¸Ü, ­n¦³Àɮפ~¯à¤F¸Ñ°ÝÃD¦ó¦b

TOP

¦^´_ 20# takeshilin88


©ÎªÌ, ­ì¹Ï¤ñ¦s©ñ¦ì¸m¤p, Åܦ¨­n"©ñ¤j":
Set rngs = Range(Cells(61, 2), Cells(61, 19))
With ActiveSheet.Shapes.AddPicture(i, False, True, rngs.Left, rngs.Top, True, True)
     .LockAspectRatio = msoFalse
     .Width = rngs.Width - 4
     .Height = rngs.Height - 4
     .Left = rngs.Left + (rngs.Width - .Width) / 2
     .Top = rngs.Top + (rngs.Height - .Height) / 2
End With

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2020-10-12 15:19 ½s¿è

¦^´_ 24# takeshilin88

¸Õ¤F¦p¹Ï:
X0001.gif
2020-10-12 14:36


Sub test()
Dim rngs As Range
Set rngs = [B61:S61]
With ActiveSheet.Shapes("¹Ï¤ù 1")
      .LockAspectRatio = True
      If .Width >= .Height Then .Width = rngs.Width - 4
      If .Height >= .Width Then .Height = rngs.Height - 4
      If .Width > rngs.Width - 4 Then .Width = rngs.Width - 4
      If .Height > rngs.Height - 4 Then .Height = rngs.Height - 4
      .Left = rngs.Left + (rngs.Width - .Width) / 2
      .Top = rngs.Top + (rngs.Height - .Height) / 2
End With
End Sub

'===============

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD