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

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

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

½Ð±Ð´¡¤J¹Ï¤ù¨ìÀx¦s®æ½d³ò®É¡A¦p¦óµ¥¤ñ¨Òªº¦bÀx¦s®æ½d³ò¤º©ñ¤j©ÎÁY¤p
¥H¤Uµ{¦¡½X¬°¹Ï¤ù¤j¤p²Å¦XÀx¦s®æ¡AÀ³¦p¦ó­×§ï©O¡H

    i = ThisWorkbook.Path & "\" & NewRef & ".jpg"
    X = Dir(ThisWorkbook.Path & "\" & NewRef & ".jpg")
       If X <> "" Then
          Set rngs = Range(Cells(61, 2), Cells(61, 19))
          ActiveSheet.Shapes.AddPicture i, True, True, rngs.Left, rngs.Top, rngs.Width, rngs.Height
       Else
      End If

ÁÂÁÂ~~

¦^´_ 25# ­ã´£³¡ªL


    ­è­è¸Õ¤@¤U¡A§âWith ActiveSheet.Shapes("¹Ï¤ù 1")§ï¦¨With ActiveSheet.Shapes.AddPicture(i, False, True, rngs.Left, rngs.Top, True, True)
    ´N¥i¥H¤F­C~~
    ·PÁ­ã¤j¡A¤Ó·PÁ¤F~~

TOP

¦^´_ 25# ­ã´£³¡ªL

    With ActiveSheet.Shapes("¹Ï¤ù 1")
    ©Î³]©w¬°With ActiveSheet.Shapes(i)
    §Ú¦b«e­±³]©w¤F
     i = ThisWorkbook.Path & "\" & NewRef & ".jpg"
   
    ³£·|¥X²{"§ä¤£¨ì«ü©w¦WºÙªº¶µ¥Ø¡C

TOP

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

¦^´_ 24# takeshilin88

¸Õ¤F¦p¹Ï:


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

¦^´_  ­ã´£³¡ªL


    ­ã¤j±z¦n¡A
    ¦]»Ý­n¹Ï¤ù©ñ¨ìÀx¦s®æ½d³ò«á¯à°µ¨ì¦p¤U¡G
    1.¹Ï¤ù¦bÀx¦s®æ½d ...
takeshilin88 µoªí©ó 2020-10-12 13:10


   ©êºp¡A§ó¥¿¤@¤UÀÉ®×~~


1091012-QUO.rar (48.04 KB)

TOP

¦^´_ 22# ­ã´£³¡ªL


    ­ã¤j±z¦n¡A
    ¦]»Ý­n¹Ï¤ù©ñ¨ìÀx¦s®æ½d³ò«á¯à°µ¨ì¦p¤U¡G
    1.¹Ï¤ù¦bÀx¦s®æ½d³ò¤º¡uµ¥¤ñ¨Ò¡vªº©ñ¤jorÁY¤p¡A¤]´N¬O±µªñÀx¦s®æ½d³òªº¤j¤p(¦ý¤£¶W¥XÀx¦s®æ½d³ò)
    2.¹Ï¤ù¦bÀx¦s®æ½d³ò¤º¤W¤U¥ª¥k¸m¤¤
    ¨Ì·Ó±zªº«ØijÁÙ¬OµLªk¹F¦¨»Ý¨D¡A¤wªþ¤WÀɮסAÁÂÁÂ~~

1091012-QUO.rar (23.15 KB)

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

¦^´_ 20# takeshilin88


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


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

TOP

¦^´_ 19# ­ã´£³¡ªL


    ¦ü¥G¨S¤°»òÅܤÆ....

TOP

¦^´_ 18# takeshilin88


.LockAspectRatio = True

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD