Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combing Workbooks


It falls over in this section of your code ...

For Each wks In CustWkbk.Worksheets
With wks
Set newWks = CombWkbk.Worksheets.Add
newWks.Name = .Name
Set destCell = newWks.Range("a1")

Do both worksheets need to be open when the macro is run or can I pu
the whole file path in, as i need a button in one of the workbooks t
run this macro

--
GazM
-----------------------------------------------------------------------
GazMo's Profile: http://www.excelforum.com/member.php...fo&userid=1461
View this thread: http://www.excelforum.com/showthread.php?threadid=27024

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Combing Workbooks

Both workbooks need to be open.

And if it still fails, make sure you indicate which line in that section fails.

Or you can open the other workbook in code.

set custwkbk = workbooks.open(Filename:="c:\your path\customer.xls")



GazMo wrote:

It falls over in this section of your code ...

For Each wks In CustWkbk.Worksheets
With wks
Set newWks = CombWkbk.Worksheets.Add
newWks.Name = .Name
Set destCell = newWks.Range("a1")

Do both worksheets need to be open when the macro is run or can I put
the whole file path in, as i need a button in one of the workbooks to
run this macro?

--
GazMo
------------------------------------------------------------------------
GazMo's Profile: http://www.excelforum.com/member.php...o&userid=14610
View this thread: http://www.excelforum.com/showthread...hreadid=270243


--

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
combing countblank with sumproduct? Rene Excel Discussion (Misc queries) 3 June 2nd 10 10:52 PM
Combing 2 lists of data bookman3 Excel Discussion (Misc queries) 2 April 23rd 09 06:11 AM
Combing months in ONE Cell Hansel Excel Discussion (Misc queries) 2 January 3rd 06 09:11 PM
Formula Help Combing two AND statements Yogi_Bear_79 Excel Worksheet Functions 1 June 7th 05 07:35 PM
Combing Workbooks GazMo[_5_] Excel Programming 1 October 19th 04 03:45 AM


All times are GMT +1. The time now is 06:28 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"