Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default So close yet so far - combining workbooks

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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
why do all excel worksheets/workbooks close when I close one? Penny Excel Discussion (Misc queries) 1 November 29th 06 03:49 AM
Open Close workbooks bbc1 Excel Discussion (Misc queries) 2 August 28th 05 11:24 AM
Why does Excel close all workbooks? JVernon Setting up and Configuration of Excel 1 July 5th 05 10:38 PM
Workbooks(). close intermittent failure Alan[_18_] Excel Programming 1 November 15th 03 04:22 PM
help with macro to open and close workbooks aneurin Excel Programming 1 September 24th 03 02:14 AM


All times are GMT +1. The time now is 01:05 PM.

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

About Us

"It's about Microsoft Excel"