Simon Lloyd
02-11-2007, 04:06 AM
Hi all, i have supplied a solution to a question asking for some code to copy sheet 1 10 times, the code is posted below.....however the ops has asked for the value of A6 which is a month to be advanced in A6 on each copied sheet!
I have tried DataSeries, xlSeries, xlMonth, etc but to no avail, any ideas?
Sub Macro1()
Dim i As Integer
Dim Sc, R As Variant
R = Sheets("Sheet1").Range("A6").Value
For i = 1 To 10
With Sheets("Sheet1")
Sc = Sheets.Count
.Copy After:=Sheets(Sc)
End With
With ActiveSheet
Range("A6") = xlMonth + 1''''''have no idea here on how to advance month on each copied sheet!
End With
Next i
End Sub
Regards,
Simon
I have tried DataSeries, xlSeries, xlMonth, etc but to no avail, any ideas?
Sub Macro1()
Dim i As Integer
Dim Sc, R As Variant
R = Sheets("Sheet1").Range("A6").Value
For i = 1 To 10
With Sheets("Sheet1")
Sc = Sheets.Count
.Copy After:=Sheets(Sc)
End With
With ActiveSheet
Range("A6") = xlMonth + 1''''''have no idea here on how to advance month on each copied sheet!
End With
Next i
End Sub
Regards,
Simon