Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a code, that copies sheets from one workbook to another. The code looks like this:
Sub CopyShees() Path = Range("h1") Filename = Dir(Path & "*.xlsm") Do While Filename < "" Workbooks.Open Filename:=Path & Filename, ReadOnly:=True For Each Sheet In ActiveWorkbook.Sheets Sheet.Copy After:=ThisWorkbook.Sheets(worksheets.count) Next Sheet Workbooks(Filename).Close Filename = Dir() Loop End Sub And it actually works. But I like it to skip the sheets in the Activeworkbook, that already exist in ThisWorkbook, so it only copies "new" sheets from the active workbook. I have treid different approaches but with no succes so far. Anybody? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copying a formula but not skipping ref cells | About this forum | |||
Copying a formula but 'skipping' a cell | New Users to Excel | |||
Copying values skipping blanks | Excel Programming | |||
Copying and skipping (adding) rows | Excel Programming | |||
copying and skipping consecutive row data | Excel Programming |