Link to home
Start Free TrialLog in
Avatar of DarrenJackson
DarrenJacksonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Copy a formula free excel file

Guys

Can you help I need a smalll change to this formual to only copy and save a specific worksheet in the workbook the sheet is named DAYWORK.
The code attached copies the entire workbook and creates a file with NO formula only values which is what I want but only need it to copy the 1 worksheet named DAYWORK

can you help please

Darren
Sub MakeValuesAndSaveAs()

    Dim ws As Worksheet

    For Each ws In ThisWorkbook.Worksheets
        ws.Cells.Copy
        ws.Cells(1, 1).PasteSpecial xlPasteValues
    Next

    ThisWorkbook.SaveAs ThisWorkbook.Path & "\" & "foo " & ThisWorkbook.Name

    MsgBox "Done"

End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DarrenJackson

ASKER

Wow that was quick cheers guys I will split as you both helped thanks