View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Possible resources issue after running macro

The large macro is in the main workbook, and it goes
out and opens three other workbooks on our SharePoint network and
copies (i.e., updates) all of the data from one sheet in the network
file into a sheet in the main workbook. The copy code is the most
efficient I've found (see below). It doesn't add a new sheet or
delete
sheets, and it does close the other workbooks. There is part of the
routine that maintains formats (row highlights) in the main workbook
to the updates.


Just curious why you don't use ADODB so you don't have to open the
workbooks to retrieve your data? Just read the data into a recordset
and 'dump' it directly into wksTarget!

With wksSource
.Cells.Copy wksTarget.Cells(1)
End With


Well this looks to be a very familiar 'style'!<g

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion