Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Did you copy the functions also in the module?
-- Regards Ron de Bruin http://www.rondebruin.nl "topstar " wrote in message ... Hi Ron, Thanks very much. I cut pasted the code from the snippet below, which you suggested. However, the macro gives the following error Compile Error: Sub or Function not defined at the line GetData Any advise? Cheers ---------------- Copy a range from a closed Workbook (filename in the code) This example will not copy the Header row (the last argument = False) Change it to True if you want to copy the header row also. This example will copy the range from the file test.xls that is in the same folder Sub GetData_Example1() 'This Copy the range to the ActiveCell GetData ThisWorkbook.Path & "\test.xls", "Sheet1", "A1:C5", ActiveCell, False 'This Copy the range to the Sheet/Range you want 'GetData ThisWorkbook.Path & "\test.xls", "Sheet1", "A1:C5", Sheets("Sheet2").Range("A1"), False End Sub --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to copy a range of cells and paste into a new workbook in differentcolumns | Excel Discussion (Misc queries) | |||
Copy workbook to 2nd workbook paste is greyed out | Excel Worksheet Functions | |||
copy and paste using code from workbook to workbook | Excel Discussion (Misc queries) | |||
Importing Data from unopened Workbook into an open Workbook | Excel Discussion (Misc queries) | |||
copy range of cells from one workbook to another | Excel Discussion (Misc queries) |