View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Importing select Range from multiple workbooks

You are welcome

--
Regards Ron de Bruin
http://www.rondebruin.nl


"deejayh" wrote in message
...

Hi Ron,

That really sorted it! Well done and Thanks.

I think I may of been getting mixed up with the sheets!?
Not sure if it meant this sheet, that sheet or the sheet in the
workbook to import!

Code:
--------------------
*et basebook = ThisWorkbook
str = Sheets("Code").ComboBox2.Value

'Clear all cells on the first sheet
'basebook.Worksheets(1).Cells.Clear
basebook.Worksheets("import").Cells.Clear

'Loop through all files in the array(myFiles)
If Fnum 0 Then
For Fnum = LBound(MyFiles) To UBound(MyFiles)
Set mybook = Workbooks.Open(MyFiles(Fnum))
rnum = LastRow(basebook.Worksheets("import")) + 1

'With mybook.Sheets(1)
With mybook.Sheets(1) 'use the first sheet in every workbook*
--------------------


I think that was the problem! Told you I was useless at this vba.

Now have to find out sorting the data then getting a chart out of it!

Onca again Ron, Many thanks,
Regards,
Dave


--
deejayh
------------------------------------------------------------------------
deejayh's Profile: http://www.excelforum.com/member.php...o&userid=34110
View this thread: http://www.excelforum.com/showthread...hreadid=540973