Copy to different workbook without opening it
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
|