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

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

³o¬O§ÚªºÀɮסA½Ð¤j¤jÀ°§Ú¬Ý¤@¤U¡A·PÁÂ:)
Ä_Ä_

TOP

¦^´_ 11# caichen3
§A­n§R°£ªº¬O¿ï¨úÀx¦s®æ¨º¤@¦Cªº¸s²Õ¶Ü?
For Each ob In ActiveSheet.OLEObjects
  If ob.Name Like "OptionButton*" Then
    If ob.TopLeftCell.Row = gyou Then ob.Delete
  End If
Next
Cells(gyou, 1).Resize(, 8).Delete xlShiftUp
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ caichen3 ©ó 2012-3-28 12:31 ½s¿è

¶â¡A§Ú­n§R°£ªº¬O·í®É¿ï¨úÀx¦s®æªº¨º¦C(gyou)
¬°¤°»ò§Ú¿ï¨ú½s¸¹4«ö¤U§R°£·|¦P®É±N½s¸¹4¡B5¤@°_§R°£©O¡H
¥u­n¬O¿ï¨ú­Ë¼Æ²Ä¤G¦C§R°£¡A´N·|±N³Ì«á¤G¦Cªº½s¸¹¡B»Ý¨D³¯­z§R°£¡A¦ýÁÙ¬O·|³Ñ³Ì«á¤@¦Cªº¿ï¶µ«ö¶s
Ä_Ä_

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-3-28 15:53 ½s¿è

¦^´_ 13# caichen3
¬°¤°»ò§Ú¿ï¨ú½s¸¹4«ö¤U§R°£·|¦P®É±N½s¸¹4¡B5¤@°_§R°£©O¡HÀ°§A¬d¬Ý±±¨î¶µªº¸s²Õ¦p¤U GroupName=5 ¦³10­ÓOptionButton±±¨î¶µ
½Ð§A¥ý¥Î Ex ªºµ{¦¡½Õ¾ã¦b¦P¤@¦C¤WªºOptionButton  ¥Î¦C¸¹³]©w¬°¦P¤@¸s²Õ
¥Î Ex ªºµ{¦¡½Õ¾ã«á¦A°õ¦æ§AªºPrivate Sub CommandButton5_Click()
  1. OptionButton2  GroupName=1
  2. OptionButton1  GroupName=1
  3. OptionButton4  GroupName=1
  4. OptionButton3  GroupName=1
  5. OptionButton5  GroupName=1
  6. OptionButton11  GroupName=2
  7. OptionButton6  GroupName=2
  8. OptionButton7  GroupName=2
  9. OptionButton8  GroupName=2
  10. OptionButton9  GroupName=2
  11. OptionButton10  GroupName=3
  12. OptionButton13  GroupName=3
  13. OptionButton12  GroupName=3
  14. OptionButton17  GroupName=3
  15. OptionButton14  GroupName=3
  16. OptionButton15  GroupName=4
  17. OptionButton16  GroupName=4
  18. OptionButton18  GroupName=4
  19. OptionButton20  GroupName=4
  20. OptionButton19  GroupName=4
  21. OptionButton21  GroupName=5
  22. OptionButton22  GroupName=5
  23. OptionButton23  GroupName=5
  24. OptionButton26  GroupName=5
  25. OptionButton24  GroupName=5
  26. OptionButton25  GroupName=5
  27. OptionButton27  GroupName=5
  28. OptionButton28  GroupName=5
  29. OptionButton29  GroupName=5
  30. OptionButton30  GroupName=5
  31. OptionButton31  GroupName=6
  32. OptionButton32  GroupName=6
  33. OptionButton33  GroupName=6
  34. OptionButton34  GroupName=6
  35. OptionButton35  GroupName=6
  36. Sub Ex()  '¦b¦P¤@¦C¤WªºOptionButton ¥H¦C¸¹³]©w¬°¦P¤@¸s²Õ
  37. Dim ob As OLEObject
  38. For Each ob In ActiveSheet.OLEObjects
  39.   If ob.Name Like "OptionButton*" Then   '
  40.     ob.Object.GroupName = ob.TopLeftCell.Row
  41.   End If
  42. Next
  43. End Sub
½Æ»s¥N½X
°õ¦æªºPrivate Sub CommandButton5_Click() ¶·­×§ï¦p¤U
  1. Private Sub CommandButton5_Click()
  2. Dim yyy As String
  3. Dim XXX As String
  4. Dim k As Integer
  5. Dim ob As Object
  6. gyou=Selection.Row
  7. ActiveSheet.Rows(gyou).ClearContents
  8. Range("I1").Value = Range("I1").Value - 1
  9. TMMPA = Range("I1").Value
  10. aaa = Chr(65)
  11. ccc = Chr(67)
  12. For I = 2 To 100
  13. XXX = I
  14. Range(aaa + XXX).Value = ("")
  15. Range(ccc + XXX).Value = ("")
  16. Next
  17. ActiveSheet.Range("A2:H200").Borders.LineStyle = XILinestyleNone
  18. ActiveSheet.Range("A2:H200").Interior.ColorIndex = xlColorIndexNone

  19. For R = 1 To TMMPA
  20. yyy = R + 1
  21. Range(aaa + yyy).Value = R
  22. Range(ccc + yyy).Value = R
  23. Next
  24. ActiveSheet.Range("A2:H" + yyy).Borders.LineStyle = xlContinuous
  25. ActiveSheet.Range("A2:H" + yyy).Borders(xlEdgeBottom).Weight = xlThick
  26. ActiveSheet.Range("A2:H" + yyy).Borders(xlEdgeRight).Weight = xlThick
  27. ActiveSheet.Range("A2:H" + yyy).Borders(xlEdgeLeft).Weight = xlThick
  28. ActiveSheet.Range("A2:A" + yyy).Interior.ColorIndex = 15
  29. For Each ob In ActiveSheet.OLEObjects
  30.   If ob.Name Like "OptionButton*" Then
  31.     If ob.Object.GroupName = Selection.Row Then ob.Delete
  32.   End If
  33. Next
  34. Selection.EntireRow.Delete   '§R°£¾ã¦C
  35. Ex        '***  ¦A«×ªº ±N ¦b¦P¤@¦C¤WªºOptionButton  ¥Î [¦C¸¹]³]©w¬°¦P¤@¸s²Õ
  36. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ caichen3 ©ó 2012-3-28 22:04 ½s¿è

½Ð°Ý¤j¤j¡G
¥Î Ex ªºµ{¦¡½Õ¾ã«á¦A°õ¦æ§AªºPrivate Sub CommandButton5_Click()   EX( )³o¬qµ{¦¡·|¸Ó©ñ¦b­þ¸Ì©O¡H¬OPrivate Sub CommandButton5_Click()¸Ì­±¤@¶}©lªº¦a¤è¶Ü¡H

±µ¤U¨Ó¦bPrivate Sub CommandButton5_Click()µ{¦¡³Ì«á­±ªº¦a¤è¦b°õ¦æ¤@¦¸EX( ) ³o¬qµ{¦¡¶Ü¡H¡H

§Ú¹Á¸Õ©ñ¦bCommandButton5_Click()µ{¦¡½X«e»P«á­±¡AÁÙ¬OµLªk¥i¥HÀ°§Ú¬Ý¤@¤U¶Ü¡A·PÁÂ:)
Private Sub CommandButton5_Click()
Dim yyy As String
Dim xxx As String
Dim k As Integer
Dim ob As OLEObject
gyou = Selection.Row
ActiveSheet.Rows(gyou).ClearContents
Range("I1").Value = Range("I1").Value - 1
TMMPA = Range("I1").Value
aaa = Chr(65)
ccc = Chr(67)

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
Cells(gyou, 1).Resize(, 8).Delete xlShiftUp

For Each ob In ActiveSheet.OLEObjects
    If ob.Name Like "OptionButton*" Then
    ob.Object.GroupName = ob.TopLeftCell.Row
    End If
Next

End Sub
Ä_Ä_

TOP

¦^´_ 13# caichen3

play.gif
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ caichen3 ©ó 2012-3-29 12:12 ½s¿è

·PÁ¤j¤jªº¦^ÂÐ:victory:
gyou = Selection.Row    ' gyouªí¥Ü©Ò¦b¦C
If ob.TopLeftCell.Row = gyou Then ob.Delete   ' ³o¦æµ{¦¡¬O»¡©ú­Yob¥ª¤WÀx¦s®æªº¦æ­Èµ¥©ógyou§Y§R°£¶Ü¡H¡H
topLeftCell.Row ¬O¥ª¤W³æ¤¸®æªº¦æ­È¡A¸Ó¦p¦ó¿ìÃÑtopleftcell.rowªº©Ò¦b¦ì¸m©O¡H¡H
Ä_Ä_

TOP

¦^´_ 17# caichen3

¬Oªº¡A¥H¿ï¶µ«ö¯Ã¦ì¸m°µ§PÂ_
©Ò¥H§A»¡·|¦³­«½Æ§R°£ªºª¬ªp¡A§Ú´N¤£ª¾¹D§A¬O«ç»ò°µªº
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

­Y§ÚSelection.Row¦b²Ä3¦C¡A½Ð°Ýtopleftcell.row¦b­þ­Ó¦ì¸m©O¡H¡H

123.JPG (7.97 KB)

123.JPG

Ä_Ä_

TOP

¦^´_ 19# caichen3
¬Ý°Êµe
«ö¶s©ñ¦b²Ä4¦C´N¬O4
²Ä5¦C´N¬O5
play.gif
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD