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

[µo°Ý] ½Ð°Ý¸Ó¦p¦óÅܧó¤u§@ªí¤¤ªº¹Ï¤ù¯Á¤Þ­È¡H

[µo°Ý] ½Ð°Ý¸Ó¦p¦óÅܧó¤u§@ªí¤¤ªº¹Ï¤ù¯Á¤Þ­È¡H

µ{¦¡½X¤¤¨Ï¥Î .Shapes.AddPicture¤èªk¨Ó¡u¥Ñ¤W¦Ó¤U¡v·s¼W¹Ï¤ù¨ì¤u§@ªí¤¤¡]¬G­ì©lªº¯Á¤Þ­È¬O¨Ì§Ç½s±Æªº¡^
¦ý¦]¤u§@»Ý¨D¤£¤@©w·|·s¼W¦b¸ê®Æ³Ì©³ºÝ  ¥i¯à·|±q¤¤´¡¤J²{¦³ªº¹Ï¤ù¤§¤¤¡]¦¹´¡¤Jªº¹Ï¤ù¯Á¤Þ­È§Y¬°¤u§@ªí¤¤ªºÁ`¼Æ¡^
¦]¦Ó¦b«áÄò­n«ü©w¯S©w¹Ï¤ù®É ´N·|µo¥Í»~§P¹Ï¤ùªº±¡ªp
¥Ø«e¬d¨ì¥i¥H¨Ï¥ÎShapes(index)¨Ó±oª¾¹Ï¤ù¯Á¤Þ­È ¦ý¤£ª¾¹D¸Ó«ç»ò¹B¥Î

¬O§_À³¸Ó±N¾ã­Ó¤u§@ªíªº¹Ï¤ù³£¥á¤J°}¦C¤¤(.Shapes.Range(Array(Picture _ ) ¡H¡H¡H)¡A¦A¨Ì§Ç¡u¥Ñ¤W¦Ó¤U¡v­«·sµ¹¤©·sªº¯Á¤Þ­È¡H
¡]¥u¬O­n«ç»ò§i¶D¹q¸£±Æ¦b·U¤W­±ªº¹Ï¤ù ¯Á¤Þ­È­n·U¤p ¬O§Q¥Î¡u¦C¼Æ¡v¶Ü¡H¡^
HELLO !!

µ{¦¡½X¤¤¨Ï¥Î .Shapes.AddPicture¤èªk¨Ó¡u¥Ñ¤W¦Ó¤U¡v·s¼W¹Ï¤ù¨ì¤u§@ªí¤¤¡]¬G­ì©lªº¯Á¤Þ­È¬O¨Ì§Ç½s±Æªº¡^
¦ý ...
baconbacons µoªí©ó 2014-11-19 20:03

§ÚªºÆ[ÂI¬O : ¬Oªº.

¹ï©ó¬Y­Ó¹Ï¤ù§A­Y¨S¦³¨Æ¥ý¬ö¿ý¥¦¬O¤°»ò¤º®e,
¨Ï¥Î®É­n«ç»ò¨Ó¤ñ¹ï?
¥À¤ù¶Ü?
¨º¤£¤S¬O¤@¦¸Åª¤JÀɮתº°Ê§@,
¦Ó¥B¹Ï¤ù¤º®e¬O§_¤@­P­n¥Î¬Æ»ò³nÅé©Î¨ç¼Æ¨Ó°µ¤ñ¹ï©O? (­nª¾¹D¹ê°È¤WÅã¥Üªº¹Ï¤ù¤j¤p¬O¥i¯à»PÀɮפ£¤@¼Ëªº - ¥i½Õ)

³Ì®e©ö¬Ý¨ìªº¨Ò¤l¬Oºô­¶¤WªºÅçÃÒ±K½X¹Ï¥Ü,
¦P­Ó¹Ï§Î¥¦¦bºô­¶¤WÅã¥Ü¥X¨Óªº¤j¤p¬O¤@­Pªº,
¦ý¦bExcel¤W­n°µ¤ñ¹ïÁÙ¬O¤£®e©ö.
§ó¹N½×¹ê°È¤W¨Ï¥Îªº¹Ï¤ù¤º®e¨Ã¤£¤@©w¬O³W«ß(¥iÂন¤å¦r)ªº,
Åã¥Ü¥X¨Óªº¤j¤p¤S¤£¤@©w¬O¬Û¦Pªº.

¦b·s¼W¹Ï¤ù®É´N°O¿ý¤U¨Ó¯Á¤Þ­È,
·|¬O¤ñ¸û§Ö³t¥B®e©ö¨Ï¥Îªº¤è¦¡.

TOP

¦^´_ 2# luhpro
luhpro ¤j¡G
´¡¤Jªº¹Ï¤ù¨Ã¨S¦³­n¤ñ¹ï¥Î³~¡A¥u¬O²{¦³´¡¤Jªº¹Ï¤ù¡A¦³®É­Ô·|¦³½Õ¾ã¥ý«á¶¶§Çªº»Ý¨D¡A©Ò¥H´N¥²¶·§Q¥Î¯Á¤Þ­È¨Ó«ü©w
¦ý°ÝÃD´N¦b©ó¸g¹L´¡¤J¤§«áªº¹Ï¤ù ÁöµM¦×²´¬Ý°_¨Ó¬O±Æ¦b²Ä¤­±i¡]Á|¨Ò¡^ ¹ê»Ú¤W¯Á¤Þ­È¥i¯à¬°7¡]¦]¬°¬O²Ä7±i´¡¤Jªº¡^
©Ò¥H¦b¨Ï¥ÎªÌ¯à°÷¬Ý¨ìªº´N¥u¦³¤u§@ªíªº¹Ï¤ù¶¶§Ç  ¦Ó¬Ý¤£¨ì¹ê»Úªº¯Á¤Þ­È
¦]¦¹¤~·|¦³·Q­n§Q¥Î¥Ñ¤W¦Ó¤U­«·sµ¹©w¯Á¤Þ­Èªº·Qªk  ¤~·|Åý¨Ï¥ÎªÌ«ü©wªº¹Ï¤ù§Y¹ê»Úªº¹Ï¤ù
¥i¬O¦]¬°§ä¨ì¸Ñªkªº¤è¦V  ¦ý¬O¤£ª¾¹D¸Ó«ç»ò­×§ïµ{¦¡½X ¤~·|¨Ó®a±Ú°Q½×
HELLO !!

TOP

¦^´_ 3# baconbacons
1. ³æ¤@¹Ï¤ù¬O§_¦³¸óÀx¦s®æ¡A³æ¤@Àx¦s®æ¬O§_§t¦h±i¹Ï¤ù
2. ­YµL¡A´«­Ó¨¤«×¥h¦Ò¼{  '¨ú±o¬YÀx¦s®æ¤ºªº¹Ï¤ù'  ­Y¦³³o¼Ëªº¥\¯à¬O¤£¬O´N¯à¹F¦¨¦UºØ§A­nªº«ü©w¹Ï¤ù©M¦UºØ¾Þ§@ªº»Ý¨D?
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 4# stillfish00
stillfish00¡G
¹Ï¤ù©Ò¦bªºÀx¦s®æ¬O¦X¨ÖÀx¦s®æ¡C
¥t¥~¨ú±o¯S©wÀx¦s®æªº¹Ï¤ù³o·Qªk¦ü¥G¬O¥i¦æªº¡A¥u¬O¯à§_¤À¨É¶i¤@¨Bªº§@ªk
§Ú¥i¥H«ü¥X¯S©wÀx¦s®æ¡A¦ý«ç»ò¾Þ§@¸ÓÀx¦s®æªº¹Ï¤ù¡H
HELLO !!

TOP

¦^´_ 5# baconbacons
­Y¹Ï¤ù¦b¦X¨ÖÀx¦s®æ¤º
  1. Function GetCellPic(rng As Range) As Object
  2.   Dim x
  3.   
  4.   For Each x In ActiveSheet.Shapes
  5.     If Not Application.Intersect(x.TopLeftCell.MergeArea, rng) Is Nothing Then
  6.       Set GetCellPic = x
  7.     End If
  8.   Next
  9. End Function
½Æ»s¥N½X
´ú¸Õ:
  1. Sub Test()
  2.   Dim oPic As Object
  3.   Set oPic = GetCellPic(Range("F4"))
  4.   
  5.   If oPic Is Nothing Then
  6.     MsgBox "nothing in this cell."
  7.   Else
  8.     MsgBox oPic.name
  9.   End If
  10. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 1# baconbacons
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Sh As Worksheet, AR(), P(), i As Integer, X As Integer
  4.     Dim M As Single, M1 As Single, MyPicture As String
  5.     Set Sh = Sheet1
  6.     X = 1
  7.     For i = 1 To Sh.Shapes.Count
  8.         If Sh.Shapes(i).Type = msoPicture Then 'ªí¤u§@ªí¤Wªº¹Ï®× ¬O¹Ï¤ù
  9.             ReDim Preserve AR(1 To X)
  10.             ReDim Preserve P(1 To X)
  11.             AR(X) = Sh.Shapes(i).Top  '¬ö¿ý±q¹Ï®×½d³ò¤¤³Ì³»ºÝ¹Ï®×ªº³»ºÝ¨ì¤u§@ªí³»ºÝªº¶ZÂ÷
  12.             P(X) = i                  '¬ö¿ýªí¤u§@ªí¤W¹Ï®×ªº¯Á¤Þ¦ì¸m
  13.             X = X + 1
  14.         End If
  15.     Next
  16.     '******** ¿ï¨ú¹Ï¤ù ********
  17.     With Application.FileDialog(msoFileDialogOpen)
  18.         .Filters.Add "Images", "*.gif; *.jpg; *.jpeg", 1
  19.         .FilterIndex = 1
  20.         If .Show = True Then
  21.             MyPicture = .SelectedItems(1)
  22.         Else
  23.             MsgBox "¨S¦³¿ï¾Ü¹Ï¤ù!!!"
  24.             Exit Sub
  25.         End If
  26.     End With
  27.    
  28.     If X = 1 Then
  29.        If MsgBox("·s¼W¹Ï¤ù :" & MyPicture, vbYesNo, Sh.Name) = vbNo Then Exit Sub
  30.        i = 0
  31.     Else
  32.         On Error Resume Next
  33.         i = InputBox("·s¼W¹Ï¤ù :" & MyPicture & " ¬°²Ä´X±i¹Ï¤ù", Sh.Name & " ¹Ï¤ù¦@ " & X - 1 & " ±i")
  34.         If Err <> 0 Then Exit Sub
  35.         If i = 0 Or i > X Then
  36.             MsgBox "²Ä" & i & "±i ¤£¦b½d³ò¤¤"
  37.             Exit Sub
  38.         End If
  39.         '*******²¾°Ê¹Ï¤ù¦ì¸m
  40.         For X = UBound(AR) To i Step -1  '¹Ï¤ùÀɥѤU©¹¤W¤U²¾¦ì¸m
  41.             M = Application.Small(AR, X)
  42.             M = Application.Match(M, AR, 0)
  43.             With Sh.Shapes(P(M))
  44.                 If UBound(AR) = 1 And X = UBound(AR) Then
  45.                     M1 = .Height + [A1].Height
  46.                 ElseIf X > 1 Then
  47.                     M1 = Application.Small(AR, X - 1)
  48.                     M1 = .Top + (.Top - Application.Small(AR, X - 1))
  49.                 ElseIf X = i Then
  50.                     M1 = Application.Small(AR, X + 1)
  51.                 End If
  52.                 .Top = M1
  53.             End With
  54.         Next
  55.     End If
  56.     With Sh.Pictures.Insert(MyPicture)
  57.         If i = 0 Then
  58.             .Top = 0
  59.             .Left = 0
  60.         ElseIf i >= 1 And i <= UBound(AR) Then
  61.             .Top = Application.Small(AR, i)
  62.             .Left = Sh.Shapes(P(1)).Left
  63.         ElseIf i > UBound(AR) Then
  64.             M = Application.Small(AR, UBound(AR))
  65.             M = Application.Match(M, AR, 0)
  66.             .Top = Sh.Shapes(P(M)).Top + Sh.Shapes(P(M)).Height + [A1].Height
  67.             .Left = Sh.Shapes(P(M)).Left
  68.         End If
  69.         .Height = 200
  70.         .Width = 200
  71.     End With
  72. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# stillfish00
stillfish00¤j¡G­×§ï¤F¤@¤U ¦³ÂI¤p°ÝÃD¦s¦b ¦A§ä®É¶¡¸Õ¸Õ³o¤èªk ·PÁÂ
HELLO !!

TOP

¦^´_ 7# GBKEE
GBKEE¤j¡GÂǥѧA´£¥Üªºµ{¦¡½X ¸g¹L´X¤Ñªº­×§ï °õ¦æ¤W¨S¦³°ÝÃD  ·P¿E
                    ¥u¬OGBKEE¤jªºµ{¦¡ ¬Û·í¦³²`«× »Ý­n¨C¦æ³æ¨B°õ¦æ¦A§äºô¸ô¸ê·½ ¨Ã©óµ{¦¡½X«á¤Uµù¸Ñ¤~¯à¬ÝÀ´
                    Á`¤§ ¾Ç¨ì¶W¦h thanks...
HELLO !!

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD