Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to copy data from 1 file to another
I want to copy data from one range in a file that is on 1
network drive- \\dnvr-fil01\Melb\SC\Rosters and Employee Lists\Employees List.xls to a file on the same drive but different folder \\dnvr-fil01\Melb\SC\T.D\ATO.xls The Range is simply A2:A100 to A2:A100 I'd like to use code to do this. Any help? Here is what I used and it doesn't populate the ATO file Private Sub CB1_Click() Worksheets("Sheet1").Range("A2:A100").Value = Workbooks_ ("Sprint Employees.xls").Worksheets("Agents").Range_ ("A2:A100").Value End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to copy data from 1 file to another
You can't reference a range in a closed file in that manner. You need to use
a workaround such as this one from John Walkenbach's site: http://j-walk.com/ss/excel/tips/tip82.htm -- Vasant "The Gza" wrote in message ... I want to copy data from one range in a file that is on 1 network drive- \\dnvr-fil01\Melb\SC\Rosters and Employee Lists\Employees List.xls to a file on the same drive but different folder \\dnvr-fil01\Melb\SC\T.D\ATO.xls The Range is simply A2:A100 to A2:A100 I'd like to use code to do this. Any help? Here is what I used and it doesn't populate the ATO file Private Sub CB1_Click() Worksheets("Sheet1").Range("A2:A100").Value = Workbooks_ ("Sprint Employees.xls").Worksheets("Agents").Range_ ("A2:A100").Value End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy data for match word from one file to another file | Excel Worksheet Functions | |||
vba code for excel to extract data from txt file | New Users to Excel | |||
Code to Copy Data from One Spreadsheet To Another | Excel Discussion (Misc queries) | |||
How do I copy data from a cell in one file to another? | New Users to Excel | |||
using vba copy data from .csv file into an excel spreadsheet | Excel Programming |