Private Sub NewSheet()
On Error Resume Next
Application.DisplayAlerts = False
Worksheets("分析").Delete
Application.DisplayAlerts = True
Dim Dt As Range
Set Dt = Application.InputBox("选择日期/价格区域", Type:=8)
Application.ScreenUpdating = False
n = Dt.Rows.Count
Worksheets.Add
ActiveSheet.Name = "分析"
ActiveWindow.DisplayGridlines = False
Set Data = Range(Cells(30, 3), Cells(29 + n, 4))
Data = Dt.Value
Data.Columns.AutoFit
Set Dt = Nothing
End Sub
为什么总是复制在原表里?
求教!
On Error Resume Next
Application.DisplayAlerts = False
Worksheets("分析").Delete
Application.DisplayAlerts = True
Dim Dt As Range
Set Dt = Application.InputBox("选择日期/价格区域", Type:=8)
Application.ScreenUpdating = False
n = Dt.Rows.Count
Worksheets.Add
ActiveSheet.Name = "分析"
ActiveWindow.DisplayGridlines = False
Set Data = Range(Cells(30, 3), Cells(29 + n, 4))
Data = Dt.Value
Data.Columns.AutoFit
Set Dt = Nothing
End Sub
为什么总是复制在原表里?
求教!