LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Copy to different workbook without opening it

Thanks again Jim. It does look like way too much trouble!



"Jim Thomlinson" wrote:

Here is a link to a good refernce for ADO. You can do through ADO but once
again it really is more work than it is worth. Turn Screen updating off. Open
the file. Do your stuff. Close the file and the end user really is none the
wiser. Unless I was trying to do large scale changes which would hold the
file open for long periods of time when other users may want to access it,
then I can not think of a good reason. That being said if that were the case
I would probably use Access where concurrent users is less of an issue.

http://www.erlandsendata.no/english/...php?t=envbadac
--
HTH...

Jim Thomlinson


"JNW" wrote:

Thanks for the reply. Didn't know whether it would work or not.

One other question for you. What is the difference between reading a file
with it still closed and copying to it while closed? I think I remember that
you can pull info from closed workbooks using ADO references. Why the
disparity?

JNW

"Jim Thomlinson" wrote:

Sorry you pretty much have to open it. There is no easy way around it. If I
recall, you can do it with an Excel4 macro but that is really more trouble
than it is worth...
--
HTH...

Jim Thomlinson


"JNW" wrote:

I've got the following code that records usage data for userform results.
'Mileage' is the name of the userform. I am merely copying the selection of
a combobox to another workbook. I would like to do this without opening the
other workbook.

Thanks

Sub Mileage_ReportTop5Data()
Dim ClosestTo As Variant
Dim ReportLoc As String

ClosestTo = Mileage.ComboClosestTo.Value
ReportLoc = "\\Trimain2\Public\Agent Forms\Forms\Data Sheets\Mileage
Requests.xls"

Application.ScreenUpdating = False
Workbooks.Open FileName:=ReportLoc
Sheets("Resorts Used").Range("B65536").End(xlUp).Offset(1, 0).Value =
ClosestTo
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
create copy of sheet tab (excel 2007) when opening workbook jatman Excel Worksheet Functions 1 February 29th 08 12:26 PM
Is there away to keep Excel from opening a copy of an already opened workbook and the pages not be at 100% but Marc New Users to Excel 1 March 13th 06 01:51 PM
Copy a worksheet without 'opening' workbook SteveS[_3_] Excel Programming 2 October 11th 04 06:02 PM
How to make the opening of a workbook conditional upon the opening of another workbook Marcello do Guzman Excel Programming 1 December 16th 03 06:09 AM
How to make opening of workbook conditional of opening of another workbook turk5555[_2_] Excel Programming 2 December 15th 03 11:07 PM


All times are GMT +1. The time now is 10:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"