View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Phrank Phrank is offline
external usenet poster
 
Posts: 153
Default Possible resources issue after running macro

On Fri, 12 Feb 2016 19:56:14 -0500, GS wrote:

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


Hi Garry. Yeah, I may very well have gotten that copy/paste code from
you. I've been using it for quite some time.

When you talk about the ADODB, do you mean a direct connection to that
workbook? If so, I'm interested, but I'm wondering how to get just
the data from a specific worksheet this way. Could you explain a
little more, please? Thank you!

Frank