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

¤@­Ó¹Ï¤ù°ÝÃD

¤@­Ó¹Ï¤ù°ÝÃD

½Ð±Ð¤j¤j«e½ú­Ì,
¤p§Ì¦³¤@´¡¤J¹Ï¤ù°ÝÃD, Àµ½Ð¤j¤j­Ì¨ó§U, ¤p§Ì§â°ÝÃD¼g©ó¥I¥ó¤º, §Æ±æ¯à¦³¦^À³, ÁÂÁÂ!!
dd.rar (142.67 KB)

¦^´_ 1# ©P¤j°¶
  1. Sub Test()
  2.     Dim v, pic As Object, currentCell As Range
  3.     If StrComp(TypeName(Selection), "Range", vbTextCompare) <> 0 Then MsgBox "Please select a cell to insert picture": Exit Sub
  4.     Set currentCell = Selection
  5.    
  6.     v = Application.GetOpenFilename("All Files (*.*), *.*,Pictures (*.jpg;*.bmp;*.png;*.gif),*.jpg;*.bmp;*.png;*.gif", 2, "Select Insert Pictures")
  7.     If StrComp(TypeName(v), "Boolean", vbTextCompare) = 0 Then Exit Sub
  8.    
  9.     Set pic = ActiveSheet.Pictures.Insert(v)
  10.     If pic Is Nothing Then Exit Sub
  11.     With pic
  12.         .Left = currentCell.Left
  13.         .Top = currentCell.Top
  14.         .ShapeRange.LockAspectRatio = msoFalse
  15.         .ShapeRange.ScaleWidth currentCell.Width / .Width, msoFalse, msoScaleFromTopLeft
  16.         .ShapeRange.ScaleHeight currentCell.Height / .Height, msoFalse, msoScaleFromTopLeft
  17.     End With
  18. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 2# stillfish00

ÁÂÁ«e½ú¡A

TOP

        ÀR«ä¦Û¦b : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD