View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
HA14 HA14 is offline
external usenet poster
 
Posts: 9
Default Macro independent of newbook name

Thank you for the coding, just want to let you know I want it all
copied to the same new workbook and therefore the macro now reads:

Dim wkbNewBook As Workbook
Set wkbNewBook = Application.Workbooks.Add

Range("A1:U58").Copy
wkbNewBook.Sheets(1).Activate
ActiveSheet.Paste

ThisWorkbook.Activate
Sheets("A&S kvt").Select
Range("A1:U56").Copy
wkbNewBook.Activate
Sheets("Sheet2").Select
ActiveSheet.Paste

ThisWorkbook.Activate
Sheets("SOL kvt").Select
Range("A1:U30").Copy
wkbNewBook.Activate
Sheets("Sheet3").Select
ActiveSheet.Paste

Hmm, I keep having the problem that nothing is actually copied from
the first sheet which I cannot figure out why since the area A1:U58 is
correct. The two other sheets copy in fine to the new workbook -
strange....

Thanks again
HA14