Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everyone,
If got a problem. I want to select data in an other workbook to copy it to the workbook the macro is placed on. I recorded the macro and it workes well. But the problem is that everytime the macro is started Excel askes where the file(for retrieving data) is. So everytime i have to browse and point out the file. This is the VB code: ActiveCell.FormulaR1C1 = _ "=[theDataFile.xls]ColumnName!R2C1:R2C3" I tried many things... like: ActiveCell.FormulaR1C1 = _ "=[C:\2003\theDataFile.xls]ColumnName!R2C1:R2C3" but nothing works...!! please help... Thomas Tromp |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub test()
Workbooks.Open Filename:= _ "Path & Servant" '--------- Workbooks("Master").Activate 'copy procedures ActiveCell.FormulaR1C1 = _ "=[Servant]ColumnName!R2C1:R2C3" '--------- Workbooks("Servant").Close End Sub "T Tromp" wrote in message ... Hi everyone, If got a problem. I want to select data in an other workbook to copy it to the workbook the macro is placed on. I recorded the macro and it workes well. But the problem is that everytime the macro is started Excel askes where the file(for retrieving data) is. So everytime i have to browse and point out the file. This is the VB code: ActiveCell.FormulaR1C1 = _ "=[theDataFile.xls]ColumnName!R2C1:R2C3" I tried many things... like: ActiveCell.FormulaR1C1 = _ "=[C:\2003\theDataFile.xls]ColumnName!R2C1:R2C3" but nothing works...!! please help... Thomas Tromp |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks very much,
thomas -----Original Message----- Hi everyone, If got a problem. I want to select data in an other workbook to copy it to the workbook the macro is placed on. I recorded the macro and it workes well. But the problem is that everytime the macro is started Excel askes where the file(for retrieving data) is. So everytime i have to browse and point out the file. This is the VB code: ActiveCell.FormulaR1C1 = _ "=[theDataFile.xls]ColumnName!R2C1:R2C3" I tried many things... like: ActiveCell.FormulaR1C1 = _ "=[C:\2003\theDataFile.xls]ColumnName!R2C1:R2C3" but nothing works...!! please help... Thomas Tromp . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA: Column Select then Data Select then return to cell A1 | Excel Discussion (Misc queries) | |||
macro to sum select columns in all workseets within a workbook | Excel Worksheet Functions | |||
Macro to select cells without a certain value and select a menu it | Excel Worksheet Functions | |||
select workbook macro | Excel Discussion (Misc queries) | |||
import select data from another workbook | Excel Worksheet Functions |