View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Can Anyone Explain This - Worksheets Copying Issue

You can just clear Static sheet and then copy /paste values from Update
sheet, then you do not have to save and close your workbook:

Private Function CreateNewsheet() As Boolean
Dim wks As Worksheet
Dim shStatic As Worksheet
Dim shUpdate As Worksheet

CreateNewsheet = False
Set shUpdate = ThisWorkbook.Worksheets("Spot Rate Update")
Set shStatic = ThisWorkbook.Worksheets("Spot Rate Static")

shStatic.UsedRange.Clear

shUpdate.UsedRange.Copy
shStatic.Range("A1").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Debug.Print Time()
CreateNewsheet = True
End Function

Regards,
Per

"Ron de Bruin" skrev i meddelelsen
...
See
http://support.microsoft.com/kb/210684

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Brian Murphy" wrote in message
...
If you're making multiple copies of a worksheet in the same file, I'm
pretty sure excel will always fail after enough copies (4 to 8) have
been made. This has been my experience.

If you save, close and reopen the file after every 3 or 4 sheets, I
think you can avoid this. Perhaps someone else knows more about it.

Good luck

Brian