Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
combing countblank with sumproduct? | Excel Discussion (Misc queries) | |||
Combing 2 lists of data | Excel Discussion (Misc queries) | |||
Combing months in ONE Cell | Excel Discussion (Misc queries) | |||
Formula Help Combing two AND statements | Excel Worksheet Functions | |||
Combing Workbooks | Excel Programming |