VBA help


K

kevin mc

Hi Team,

i'm trying to copy two sheets from template workbook with macro that will
copy both sheets to new workbook excluding formulas and save as filename list
is sheet 1 cell b5, i know the below code is wrong therefore i need some
assistance

Application.ScreenUpdating = False
Application.DisplayAlerts = False
ActiveWorkbook.Worksheets(Array(2, 3)).Copy
With Worksheet(1)
..Copy
..PasteSpecial xlPasteValuesAndNumberFormats
Next Worksheet(2)
..Copy
..PasteSpecial xlPasteValuesAndNumberFormats
End With
ActiveWorkbook.SaveAs ("N:\02 Public Health\Comparison Report- v7 - " &
Range("b5").Value)
Application.ScreenUpdating = True

many thanks
 
Ad

Advertisements

Ë

딸짱

Edit as followed

Application.ScreenUpdating = False
ActiveWorkbook.Worksheets(Array(2, 3)).Copy
ActiveWorkbook.SaveAs "N:\02 Public Health\Comparison Report- v7 - " & _
Range("b5").Value
Application.ScreenUpdating = True
 
Ad

Advertisements

K

kevin mc

thanks fro the response, it still copies all formula also is there any way to
remove them also,
thanks
 

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