Hi,
I'm creating new worksheets using VBA and I need to populate a summary page. I'm using the following code which copies the content populated in the newly created worksheet to the summary sheet, however the content contains formulas and I need to only paste the values and the cell formatting.
Code
[FONT=Arial][size=10][COLOR=#17365d]For Each ws In Worksheets[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]Select Case UCase(ws.Name)[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]Case "Index", "Data", "Summary", "Charts"[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]'Do nothing[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]Case Else[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]ws.Range("Z6:AB11").Copy [/COLOR][/SIZE][/FONT][FONT=Arial][size=10][COLOR=#17365d]Destination:=Sheets("Summary").Range("B65536").End(xlUp).Offset(2, 0)[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]x = x + 1 [/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]End Select[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]Next ws[/COLOR][/SIZE][/FONT]
[FONT=Arial][size=10][COLOR=#17365d]
[/COLOR][/SIZE][/FONT]
All i see once the content has been pasted is #REF!.
Thanks
Daren