Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Application.EnableEvents = False
Dim i As Integer
Dim myrange As Range
ActiveCell.Select
If Target.Value <> "" Then
Selection.Copy
Worksheets("sheet2").Select
'Worksheets("sheet2").Activate
myrange = Worksheets("sheet2").Range("A2:A").Select '这句总是不能通过,请帮我看看错在那里。
i = Application.WorksheetFunction.Max(myrange) + 1
Worksheets("订单明细").Cells(i, 2).Select
Worksheets("订单明细").Cells(i, 2).paste
Application.CutCopyMode = False
Application.EnableEvents = True
End If
End Sub作者: shxxfgqj 时间: 2005-12-28 22:56
把后面的.Select 去掉作者: 34551391 时间: 2005-12-28 23:40
谢谢楼上,ok