Can't think of a title for this question
Hi, I have not used excel for a number of years, and now that I need to I've come to the point where I'm stuck.
I've made a simple stock sheet where each stock item total remaining is taken to the next day - the next day being a new tab.
I'd like to auto create new tabs for the whole year 01 Oct 13 to 30 Sept 14
And I'd like each line item total to be carried over from the previous day.
I've tried using a micro record, and here's what it does (in Debug):
Sub Copy()
'
' Copy Macro
' create new tab
'
' Keyboard Shortcut: Ctrl+d
'
Cells.Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Cells.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "12 Oct 13"
Sheets("12 Oct 13").Select
Range("N11").Select
ActiveCell.FormulaR1C1 = "='11 Oct 13'!RC[2]"
Range("N11").Select
Selection.AutoFill Destination:=Range("N11:N54"), Type:=xlFillDefault
Range("N11:N54").Select
Range("N47").Select
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 1
Range("K11").Select
End Sub
The error starts on line Sheets("Sheet1").Select
How can I make this work?
Is there any easier way?
Thanks
Tiny
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago