大家帮我哈
Private Sub mnuDynaDel_Click()Dim str
str = InputBox("输入所要删除的菜单标题")
Dim item, curItem
For Each item In mnuDynaArray
If item.Caption = str Then
Set curItem = item
Exit For
End If
Next item
If Not IsEmpty(curItem) Then
Unload curItem
If mnuDynaArray.Count <= 1 Then
mnuDynaDel.Enabled = False
mnuDynaDelLast.Enabled = False
mnuDynaArray(0).Visible = False
End If
Else
MsgBox "没有找到您所要删除的菜单项!", vbCritical
End If
End Sub
其中 If Not IsEmpty(curItem) Then
Unload curItem
什么意思啊
这个语句For Each item In mnuDynaArray
If item.Caption = str Then
Set curItem = item
Exit For
End If
Next item
不是已经找到了啊 直接删除不就行了吗