B
Bonnie
I'm trying to step through a workbook, sheet by sheet,
copying data in column A to another column each month.
July goes to column F, August to G, etc. I'm using the
cell method to change the column reference each time. My
data has a number month indicator. I get a run time error
telling me that I must have an object for this method but
my Excel VBA reference says that if I don't specify an
object it defaults to the active sheet. Please help.
Here is my code.
'Copy PivotTable results to appropriate month as values.
Do While x <= NumSheetsToPop
Worksheets(x + 1).Activate
Range("A442:A852").Select
Selection.Copy
ActiveSheet.Cells(PasteRow, Month + 5).Select
Selection.PasteSpecialPaste:=xlPasteValues,Operation:=xlNon
, SkipBlanks _
:=False, Transpose:=False
x = x + 1
Loop
copying data in column A to another column each month.
July goes to column F, August to G, etc. I'm using the
cell method to change the column reference each time. My
data has a number month indicator. I get a run time error
telling me that I must have an object for this method but
my Excel VBA reference says that if I don't specify an
object it defaults to the active sheet. Please help.
Here is my code.
'Copy PivotTable results to appropriate month as values.
Do While x <= NumSheetsToPop
Worksheets(x + 1).Activate
Range("A442:A852").Select
Selection.Copy
ActiveSheet.Cells(PasteRow, Month + 5).Select
Selection.PasteSpecialPaste:=xlPasteValues,Operation:=xlNon
, SkipBlanks _
:=False, Transpose:=False
x = x + 1
Loop