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

¦p¦ó¤Ï¦V«ä¦Ò½Æ»s®æ¦¡ªº¤è¦¡!

VBA¨ú±o½u±øªº®y¼Ð­È!!

§Ú·Q¨Ï¥ÎVBA±N¤u§@ªí¤¤©Òµeªº½u±ø
¨äÀY§Àªº®y¼Ð­È°O¿ý¤U¨Ó
¦ý¬O¤£²M·¡­n¦p¦ó°Ê§@
Selection.ShapeRange.Name ¥i¥H¨ú±o½u±øªº¦WºÙ
¨º­n¨Ï¥Î­þ­Ó«ü¥O¡A¤~¯à¨ú±o½u±ø¡AÀY§À¨âÂIªº®y¼Ð¸ê®Æ©O??

TOP

¦^´_ 1# yenwang


Dim sp As Shape
For Each sp In sheet1.Shapes
    K = K + 1
    Cells(K + 1, "A") = sp.Name
    Cells(K + 1, "b") = sp.Type
    Cells(K + 1, "c") = sp.Top
    Cells(K + 1, "d") = sp.Left
    Cells(K + 1, "e") = sp.Height
    Cells(K + 1, "F") = sp.Width
Next

µ¹§A°Ñ¦Ò

TOP

¦^´_ 1# yenwang
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.    Dim x As Single, y As Single, x1 As Single, y1 As Single
  4.    Dim S As Shape
  5.    ActiveSheet.Shapes.SelectAll
  6.    Selection.Delete
  7.    Set S = ActiveSheet.Shapes.AddLine(209.4, 160.2, 370.8, 223.2)
  8.    With S
  9.         x = .Left
  10.         y = .Top
  11.         x1 = x + .Width
  12.         y1 = y + .Height
  13.         
  14.     End With
  15.     Set S = ActiveSheet.Shapes.AddLine(x, y + 20, x1, y1 + 20) '©¹¤U20ÂI·s¼W½u±ø
  16. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE


ÁÂÁ¤j®aªºÀ°§U
¦³²M·¡¥B¥i¥H¸Ñ¨M°ÝÃD¤F
·P®¦

TOP

¦p¦ó¤Ï¦V«ä¦Ò½Æ»s®æ¦¡ªº¤è¦¡!

¥Ñ©ó²{¦bªºEXCELªº½u±ø½Æ»s®æ¦¡¤W
»Ý­n¥ý¦b®æ¦¡¨Ó·½¤WÂI¿ï
µM«á½Æ»s®æ¦¡«á
¦AÂI¿ï­nÅܧó®æ¦¡ªº½u±ø
§Ú·Q½Ð°Ý
¦³¿ìªk¤Ï¦V«ä¦Ò¶Ü??
¦]¬°²{¦b§Ú­n­×§ïªº®æ¦¡¥i¯à¦³´X¤Q±ø½u±ø©Î¬O¦hÃä§Î
§Ú·Q¥ý§Q¥Î¿ï¨úªº¤è¦¡
±N³o´X¤Q½u±ø©Î¦hÃä§Î¿ï¨ú
µM«á«ö¤U¥¨¶°«á
«h­n¨D¿ï¨ú¹wÅܦ¨¥Ø¼Ð®æ¦¡ªº½u±ø
µM«á´N¬O³o´X¤Q½u±ø©Î¦hÃä§Îªº½u«¬´N¨Ì·Ó©Ò¿ï¨úªº¥Ø¼Ð®æ¦¡­×§ï
¦³¿ìªk³o¼Ë¤l¼gµ{¦¡¶Ü???

¦^´_ 1# yenwang
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Sp As Object
  4.     Dim A(1 To 4), i, b(1 To 4)
  5.     A(1) = Array([D5].Left, [D5].Top)
  6.     A(2) = Array([D10].Left, [D10].Top)
  7.     A(3) = Array([H10].Left, [H10].Top)
  8.     A(4) = Array([H5].Left, [H5].Top)
  9.     ActiveSheet.Shapes.SelectAll
  10.     Selection.Delete
  11.     For i = 1 To UBound(A)
  12.         With ActiveSheet.Shapes.AddLine(A(i)(0), A(i)(1), A(IIf(i < UBound(A), i + 1, 1))(0), A(IIf(i < UBound(A), i + 1, 1))(1))
  13.         b(i) = .Name
  14.         End With
  15.     Next
  16.     Set Sp = ActiveSheet.Shapes.Range(b)
  17.     With Sp
  18.         .Fill.Transparency = 0#
  19.         .Line.Weight = 4.5
  20.         .Line.ForeColor.SchemeColor = 10
  21.     End With
  22.     Stop
  23.     A(1) = Array(0, 3, 5, 7)
  24.     For i = 1 To Sp.Count
  25.         With Sp(i)
  26.             .Fill.Transparency = 0
  27.             .Line.Weight = A(1)(i - 1)
  28.             .Line.ForeColor.SchemeColor = A(1)(i - 1) + 10
  29.             .Line.BeginArrowheadLength = msoArrowheadLengthMedium
  30.             .Line.EndArrowheadWidth = msoArrowheadWidthMedium
  31.             .Line.EndArrowheadStyle = msoArrowheadOval
  32.         End With
  33.     Next
  34. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2015/3/11 06:14): ¤p¾Ç¥Í¨S¦³Åv­­¤U¸üªþ¥ó,¤W¶Ç¤£¦¨¥\ªþ¥ó¬Ý¬Ý

¦³½d¨Ò¤U¸ü¬Ý¶Ü¡H§Ú³£¸Õ¤£¦¨¥\¡I

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD