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

[µo°Ý] ¿ï¨ú¯S©wÀx¦s®æ½d³ò¤ºªº¹Ï§Îª«¥óªºVBA»yªk

¦^´_ 2# jsleee
VBA¥u¯à±q¹Ï¤ù±o¨ì¨ä¥ª¤W¨¤ªºÀx¦s®æ
¨S¿ìªk"ª½±µ"±qÀx¦s®æ±o¨ì¹ïÀ³¹Ï¤ù
©Ò¥H¥u¯à¦Û¤v¼gFunction¥ÎFor¥h§ä¡A¨Ò¦p¤U­±³o¼Ë
  1. Function GetPicByCell(from_cell As Range) As Picture
  2.     For Each pic In ActiveSheet.Pictures
  3.         If pic.TopLeftCell.Address = from_cell.Address Then
  4.             Set GetPicByCell = pic
  5.             Exit Function
  6.         End If
  7.     Next
  8.     Set GetPicByCell = Nothing
  9. End Function
½Æ»s¥N½X
  1. Sub Test1()
  2.     Dim pic As Picture
  3.     Set pic = GetPicByCell(Cells(32, 2))
  4.     If pic Is Nothing Then
  5.         MsgBox "§ä¤£¨ì¹Ï¤ù"
  6.     Else
  7.         Debug.Print pic.Width, pic.Height
  8.     End If
  9. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

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