|
楼主 |
发表于 2012-9-17 15:55
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
我找到问题了 可是怎么解决啊 代码冲突造成的
Private Sub CommandButton2_Click()
Range("g7").Select
[N14] = "=n13*L13"
ActiveSheet.Name = Format(Now, "mm.dd.ss") & [C6]
' With Sheet2
' On Error Resume Next
' r = .[a65536].End(3).Row + 1
' k = Sheets.Count
' .Cells(r, 1) = Sheets(k).Name
' End With
Unload Me
End Sub
Private Sub CommandButton3_Click()
Application.ScreenUpdating = False
ActiveSheet.ComboBox1.Value = UserForm2.ComboBox3.Value
Sheet2.Range("A65536").End(xlUp).Clear
Sheet2.Range("b65536").End(xlUp).Clear
Sheet2.Range("c65536").End(xlUp).Clear
Sheet2.Range("d65536").End(xlUp).Clear
With Sheet2
On Error Resume Next
r = .[a65536].End(3).Row + 1
k = Sheets.Count
.Cells(r, 1) = Sheets(k).Name
.Cells(r, 2) = Sheets(k).[O4].Value
.Cells(r, 3) = DateValue(Application.Text(Left(.Cells(r, 2), 8), "0000-00-00"))
.Cells(r, 4) = Application.Text(Right(.Cells(r, 2), 2), "00")
End With
Application.ScreenUpdating = True
End Sub
注释掉按钮1 里的代码错误消失 可是无法汇总了 |
|