#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default VBA help

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default VBA help

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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default VBA help

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

"딸짱" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"