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

[µo°Ý] ¦p¦ó§R°£±±¨î¶µ

[µo°Ý] ¦p¦ó§R°£±±¨î¶µ

½Ð°Ý­Y§Ú¬O¥HOLEObjects.Add¤èªk¼W¥[¦h­Ó¤£¦P¸s²Õªº¿ï¶µ«ö¶s¡A¦pªG§Ú­n§R°£¨ä¤¤¬Y¤@­Ó¸s²Õ¡A¸Ó¥Î¤°»ò¤èªk©O¡H¡H
Ä_Ä_

¦^´_ 1# caichen3


    Shapes.Item(1).Delete
    item(1) ¸s²Õ¤@

   ©p³o­Ó°ÝÃDÀ³¸Ó¸ò©p¤§«e°Ýªº°ÝÃD©µ¦ù¥X¨Óªº
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¿ï¶µ«ö¶s¬O¥Hvbaµ{¦¡ªº¤è¦¡¥[¤J¡A¥kÃ䪺«ö¶s¬O¥H[¶}µo¤H­û]/[´¡¤J]/[active X «ö¨î¶µ]ªº¤è¦¡¥[¤J¡A
­Y§Ú¦³5²Õ¿ï¶µ«ö¶s¡A­n§R°£GroupName=4¡Aµ{¦¡½X¦p¤U¡G

Private Sub CommandButton5_Click()
   ActiveSheet.Shapes.Item(4).Delete
End Sub

·í§Ú°õ¦æ®É¡Aµ²ªG«K·|±N¥kÃ䪺«ö¶s§R°£¡A¬O¬°¤°»ò©O¡H

123.JPG (67.74 KB)

123.JPG

Ä_Ä_

TOP

¦^´_ 3# caichen3
  1. Private Sub CommandButton5_Click()
  2.     Dim E As Object
  3.     For Each E In ActiveSheet.OLEObjects
  4.         If E.Name Like "OptionButton*" Then
  5.             If E.Object.GroupName = 4 Then E.Delete
  6.         End If
  7.     Next
  8. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-3-26 16:04 ½s¿è

¦^´_ 3# caichen3


    ¥H§Aªº¹Ï¤ù¤W©ÒÅã¥Üªº«ö¶s¼ÐÃD¦r¦ê³W«h¥i§Q¥ÎÃD¸¹¨Ó°Ï§O
  1. Sub Del_Opt()
  2. Dim k%
  3. k = InputBox("±ý§R°£ªº¸s²Õ", , 4)
  4. For Each ob In ActiveSheet.OLEObjects
  5. If ob.progID = "Forms.OptionButton.1" Then
  6.    If Val(ob.Object.Caption) = k Then ob.Delete 'ÃD¸¹»Pk­È¬Û¦P´N§R°£
  7. End If
  8. Next
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁ¦U¦ì¤j¤jªº¦^Âгá
Ä_Ä_

TOP

¥»©«³Ì«á¥Ñ caichen3 ©ó 2012-3-27 17:38 ½s¿è

½Ð°Ý¦U¦ì¤j¤j
§Ú¦³5¶µ»Ý¨D³¯­z(¹Ï1)¡A·í§Ú«ö¤U¥kÃä"§R°£"«ö¶s¡A§R°£²Ä4¶µ»Ý¨D³¯­z¡A¹Ïµe§e²{¦p¹Ï2¡A­Y§Æ±æ±N¹Ï2¤U­±¿ï¶µ«ö¶s¨Ì§Ç©¹¤W±Æ¦C¸Ó¦p¦ó©O¡H¡H
¥H¤U¬O§Úªºµ{¦¡½X¡G
rivate Sub CommandButton5_Click()
gyou = Selection.Row
ActiveSheet.Rows(gyou).ClearContents
Range("I1").Value = Range("I1").Value - 1
TMMPA = Range("I1").Value
aaa = Chr(65)
ccc = Chr(67)
Dim yyy As String
Dim XXX As String
Dim k As Integer
Dim ob As Object

For I = 2 To 100
XXX = I
Range(aaa + XXX).Value = ("")
Range(ccc + XXX).Value = ("")
Next
ActiveSheet.Range("A2:H200").Borders.LineStyle = XILinestyleNone
ActiveSheet.Range("A2:H200").Interior.ColorIndex = xlColorIndexNone

For R = 1 To TMMPA
yyy = R + 1
Range(aaa + yyy).Value = R
Range(ccc + yyy).Value = R
Next
ActiveSheet.Range("A2:H" + yyy).Borders.LineStyle = xlContinuous
ActiveSheet.Range("A2:H" + yyy).Borders(xlEdgeBottom).Weight = xlThick
ActiveSheet.Range("A2:H" + yyy).Borders(xlEdgeRight).Weight = xlThick
ActiveSheet.Range("A2:H" + yyy).Borders(xlEdgeLeft).Weight = xlThick
ActiveSheet.Range("A2:A" + yyy).Interior.ColorIndex = 15

k = gyou - 1
For Each ob In ActiveSheet.OLEObjects
  If ob.Name Like "OptionButton*" Then
    If ob.Object.GroupName = k Then ob.Delete
  End If
Next

End Sub

1.JPG (60.73 KB)

1.JPG

2.JPG (54.29 KB)

2.JPG

Ä_Ä_

TOP

¦^´_ 7# caichen3

ob.Object.GroupName = k
¦ý¬O§A¦b«Ø¥ß¿ï¶µ«ö¶s®Éµ¹¥LªºGroupName¬O¥u¦³¼Æ¦r¶Ü?
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¶â~§Ú«á¨Ó±N¨C­Ó¿ï¶µ«ö¶sªºGroupName³£§ï¬°¼Æ¦r
Ä_Ä_

TOP

¦^´_ 9# caichen3
§âÀɮתþ¤W¤~¯à¤F¸Ñ°ÝÃD©Ò¦b
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD