Combing Workbooks

  • Thread starter Thread starter GazMo
  • Start date Start date
G

GazMo

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top