Is there a function to copy an entire worksheet?

N

nickclingan

Hello,

I have been asked to create a worksheet in which there is some sort of
button/condition that can be selected which will then copy all of the
information in the worksheet to another specified worksheet in another
workbook. Basically it needs to be a test worksheet template in which
the user can make some sort of selection to have all the information
logged into the sheet copied over to a subsequent worksheet without
having to go through copying/pasting or resaving by themselves. Is
there any way to do this? Thanks,

Nick
 
A

Arvi Laanemets

Hi

Here is a procedure, which copies values along with sheet formatting to new
workbook. All links and buttons are removed. The archive folder address is
stored in cell H4 on same worksheet.

Public Sub Archive()
ActiveSheet.Select
ActiveSheet.Copy
ActiveSheet.Unprotect Password:="***"
ActiveSheet.Buttons.Delete
' deleting links and address of archive folder from sheet header
Range("G2:H4").Select
Selection.ClearContents
Range("A5:p39").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Application.CutCopyMode = False
txtFileName = Range("H4").Value & Range("A4").Value & " WorkingTime " &
Month(Range("A5")) & " " & Year(Range("A5")) & ".xls"
ActiveWorkbook.SaveAs FileName:=txtFileName _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close
End Sub


--
Arvi Laanemets
( My real mail address: arvi.laanemets<at>tarkon.ee )



"nickclingan" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top