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

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

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

¥HOLEObjects.Add¤èªk¥[¤JCheckbox±±¨î¶µ¡A
­Y­n§R°£¤u§@ªí¤º¤§«e¥[¤JªºCheckbox¡A¸Ó¦p¦ó¼g©O¡H
Dim OB As OLEObject
For Each OB In ActiveSheet.OLEObjects
   If OB.progID = "Forms.checkbox.1" Then OB.Delete
Next
Ä_Ä_

¦^´_ 1# caichen3
Forms.CheckBox.1  ¤j¤p¼g­n£¸­P

TOP

¦^´_ 2# GBKEE

µ{¦¡½X "Forms.Checkbox.1"¤w¬O¤j¼g¦ýÁÙ¬OµLªk²M°£­ì¥ýªº±±¨î¶µ¡A½Ð¤j¤jÀ°§Ú¬Ý¬Ý¡I
Private Sub CommandButton1_Click()
Dim x As Integer
Dim xxx As String
Dim yyy As String
Dim OB As OLEObject

x = UserForm1.ComboBox1.Value
Range("G1").Value = x

For i = 10 To 200
    xxx = i
    Range("A" & xxx).Value = ("")
    Range("B" & xxx).Value = ("")
    Range("C" & xxx).Value = ("")
Next
ActiveSheet.Range("A10:F200").Borders.LineStyle = XILinestyleNone

For j = 1 To x
    yyy = 9 + j
    Range("C" & yyy).Value = j
Next

ActiveSheet.Range("A10:F" & yyy).Borders.LineStyle = xlContinuous
'ActiveSheet.Range("A10:F" & yyy).Borders(xlEdgeBottom).Weight = xlThick
'ActiveSheet.Range("A10:F" & yyy).Borders(xlEdgeRight).Weight = xlThick


For Each OB In ActiveSheet.OLEObjects
   If OB.progID = "Forms.Checkbox.1" Then OB.Delete
Next
n = 1
For Each a In Range("C:C").SpecialCells(xlCellTypeConstants)
   For k = 1 To 3
   
    Select Case k
        Case "1"
        MyStr = n & "¥\¯à©Ê»Ý¨D"
        Case "2"
        MyStr = n & "·P©x©Ê»Ý¨D"
        Case "3"
        MyStr = n & "ÁôÂéʻݨD"
    End Select
   
   With a.Offset(, k)
      Set OB = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Checkbox.1", Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height)
          OB.Object.Caption = MyStr
          OB.Object.GroupName = n
      
   End With
   Next
  n = n + 1
Next
End Sub

¬¡­¶Ã¯1.rar (137.47 KB)

Ä_Ä_

TOP

For Each g In ActiveSheet.Shapes
If g.Name Like "Group*" Then g.Delete
   Next


§R¸s²Õ

TOP

¦^´_ 3# caichen3
Forms.CheckBox.1  ¤j¤p¼g­n£¸­P
¬Ý¬Ý ­þ¸Ì¤£¤@¼Ë
If OB.progID = "Forms.Checkbox.1" Then OB.Delete

TOP

¦^´_ 5# GBKEE


    ·PÁ¤j¤j¡A­ì¨Ó¬O¤W¤U¤å"b"¤£¤@­P ==
    ·\ª¹°Ú~~~
Ä_Ä_

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD