Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This portion of the code:
If WorksheetExists(wks.Name, ThisWorkbook) Then 'do nothing Else With ThisWorkbook 'get headers and all the layout wks.Copy _ after:=.Sheets(.Sheets.Count) 'clean any data in that existing sheet 'so that empty rows can be avoided With .Worksheets(wks.Name) For aCtr = LBound(myAddr) To UBound(myAddr) .Range(myAddr).ClearContents Next aCtr End With End With End If copies headers--in fact, it copies the whole worksheet if it didn't exist in the receiving workbook. Are you sure the worksheet has headers? "happy <" wrote: Thanks for your reply, I did get your code but it is still not working probably. It still seems to import headers only on 6 worksheets. If you would like I can send you the code via private email. Please advise, Happy --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
why do all excel worksheets/workbooks close when I close one? | Excel Discussion (Misc queries) | |||
Open Close workbooks | Excel Discussion (Misc queries) | |||
Why does Excel close all workbooks? | Setting up and Configuration of Excel | |||
Workbooks(). close intermittent failure | Excel Programming | |||
help with macro to open and close workbooks | Excel Programming |