View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Copy a Range from each workbook - Ron de Bruin VBA - a problem

Use this

basebook.Worksheets(1).Cells(rnum, "H").Resize(SourceRcount).Value = mybook.Name


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Philip" wrote in message ...
Sorry Ron, one more thing:
You have the line
basebook.Worksheets(1).Cells(rnum, "H").Value = mybook.Name
' This will add the workbook name in column D if you want
Which is useful, but it only puts the name in the first row of the range from each workbook: how do I get that value to go in
every row of the range from each workbook as part of the macro?
Philip


Ron de Bruin wrote:
Hi Philip

There is no check in this code example to see if the file is open.
Every file in the folder must be closed