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

[µo°Ý] ÃöÁä¦r§ì¹Ï¤ù

¦^´_ 4# GBKEE
¯u¤£¦n·N«ä¡Aª¬ªp¨Ì¡A¦pªþ¥ó¡G
My Pictures.rar (315.17 KB)

TOP

¦^´_ 3# c_c_lai
  1. Option Explicit
  2. Sub Ex()
  3.     With ActiveSheet
  4.         .Pictures.Delete
  5.         .Cells(5, "D").Select
  6.         With .Pictures.Insert("d:\ex1.gif")
  7.             .ShapeRange.LockAspectRatio = msoFalse '¦b½Õ¾ã¹Ï®×¤j¤p®É¡A¥i¥H¤À§O¦a½Õ¾ã¹Ï®×ªºªø«×©M¼e«×
  8.             .ShapeRange.Height = IIf(.ShapeRange.Height > 100, 100, .ShapeRange.Height)
  9.             .ShapeRange.Width = IIf(.ShapeRange.Width > 200, 200, .ShapeRange.Width)
  10.             End With
  11.     End With
  12. End Sub
  13.                     
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE
  1.                     .ShapeRange.Height = 100#
  2.                     .ShapeRange.Width = 100#
  3.                     .ShapeRange.Rotation = 0#
½Æ»s¥N½X
½Ð±Ðª©¤j¡A¤W­±©Ò­z "°ª«×"¡B"¼e«×"ªº³]©w°ÝÃD¡C
°²³]§Ú¹Ï¤ùªº¤j¤p¤£¤@¡A§Ú¦p¦ó¯à±N¨ä¶×¤J°¦¤j¤p­­¨î¡A
(¦p .ShapeRange.Height = 100# ¤§§i¥Ü)
ÁÂÁ±z¡I

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-12 11:24 ½s¿è

¦^´_ 1# whirlwind963
  1. Option Explicit
  2. Sub Ex()
  3.     Dim j As Integer, MyPath As String
  4.     j = 2
  5.     MyPath = "C:\My Pictures\"
  6.     While Cells(j, "C") <> ""
  7.         If UCase(Cells(j, "C")) Like "*ABCD*" Then  '¦r¦ê¤¤¦³"ABCD"
  8.            'UCase ¨ç¼Æ ¶Ç¦^¤@­Ó Variant (String)¡A©Ò§t¬°Âন¤j¼g¤§¦r¦ê¡C
  9.             Cells(j, "D").Select
  10.            If Dir(MyPath & Cells(j, "C")) <> "" Then
  11.                 With ActiveSheet.Pictures.Insert(MyPath & Cells(j, "C"))
  12.                     '  .ShapeRange.LockAspectRatio = msoTrue
  13.                     '  ¦b½Õ¾ã¹Ï®×¤j¤p®É¡A¥i¥H¤À§O¦a½Õ¾ã¹Ï®×ªºªø«×©M¼e«×
  14.                     .ShapeRange.LockAspectRatio = msoFalse
  15.                     .ShapeRange.Height =  100
  16.                     .ShapeRange.Width =  200,
  17.                     .ShapeRange.Rotation = 0
  18.                     .Placement = xlMoveAndSize
  19.                     .PrintObject = True
  20.                 End With
  21.             End If
  22.         End If
  23.         j = j + 1
  24.     Wend
  25.     Range("C2").Select
  26. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD