請教大大們~
若想要在目前儲存格按下「插入」按鈕,會插入新的一列,並且在新的一列中會新增一列核取方塊?
在目前儲存格按下「刪除」按鈕,會刪除整列包括所在列的核取方塊??
Private Sub 插入_Click()
Dim i As Integer
Dim k As Integer
Dim ob As OLEObject
Dim xR As Range
k = gyou + 1
Set xR = Cells(k, 3)
For i = 1 To 3
Select Case i
Case "1"
mystr = "功能性需求"
Case "2"
mystr = "感官性需求"
Case "3"
mystr = "隱藏需求"
End Select
With xR.Offset(, i)
Set ob = ActiveSheet.OLEObjects.Add(ClassType:="Forms.CheckBox.1", Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height)
ob.Object.Caption = mystr
End With
Next