copy a workbook without copying any data

R

Rusty

I there a way to copy a workbook without copying any data. I would like to
copy all tabs,micros,links and formulas without any data in the cells or
notes for the cells being copied.
Thank You
 
N

Norman Jones

Hi Rusty,

One way:

Sub Tester()
Dim sh As Worksheet
Dim strName As String

strName = "ABCD.xls" '<<==== CHANGE

ActiveWorkbook.SaveCopyAs strName
Workbooks.Open Filename:= _
Application.DefaultFilePath & "\" & strName
For Each sh In Workbooks(strName).Worksheets
On Error Resume Next
sh.Cells.SpecialCells(xlConstants).ClearContents
sh.Cells.SpecialCells(xlCellTypeComments).Delete
On Error GoTo 0
Next
Workbooks(strName).Save
Application.DefaultFilePath
End Sub


Change ABCD to suit.
 
R

Rusty

Thank You Norman for your reply
But that is out of my range... I am teaching myself excel and haven't got
to that level YET.
 
Top