|
回复 qiongmei 的帖子
- Private Sub CommandButton1_Click()
- Dim x&
- With Sheets("界面")
- If Application.CountIf(.Range("A:A"), TextBox1.Text) > 0 And Len(TextBox1.Text) > 0 Then
- x = Application.Match(TextBox1.Text, .Range("A:A"), 1)
- Application.DisplayAlerts = False '临时关闭EXCEL 系统提示
- Sheets(TextBox1.Text).Delete
- .Cells(x, 1).Delete
- Application.DisplayAlerts = True 'EXCEL 系统提示
- Else
- MsgBox "您输入的名称不存在"
- End If
- End With
- End Sub
复制代码
|
|