Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use Cell as Source file
Hi, I would like to use the name in the C4 in Sheet1 as my source file as xls file. I have written a macro but have error. Attached please find the macro. Anyone can help. Thanks. Sub Macro1() Range("K10").Select ActiveCell.FormulaR1C1 = "=[Sheet1!C4.xls]LeakFreq!R39C4" End Sub -- ccl28 ------------------------------------------------------------------------ ccl28's Profile: http://www.excelforum.com/member.php...o&userid=36095 View this thread: http://www.excelforum.com/showthread...hreadid=569812 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use Cell as Source file
Your code does not help a lot, but
If you want to use a value in a cell to refer to a workbook name, you should read this value into a varable. Something like wOne = Range("C4").value. You can then refer to the workbook using wOne. You also cannot mix R1C1 and A1 references, as you are doing. ActiveCell.Formula = "='[" & wOne "]LeakFreq'!D39" would give you the workbook referred to in C4 "ccl28" wrote: Hi, I would like to use the name in the C4 in Sheet1 as my source file as xls file. I have written a macro but have error. Attached please find the macro. Anyone can help. Thanks. Sub Macro1() Range("K10").Select ActiveCell.FormulaR1C1 = "=[Sheet1!C4.xls]LeakFreq!R39C4" End Sub -- ccl28 ------------------------------------------------------------------------ ccl28's Profile: http://www.excelforum.com/member.php...o&userid=36095 View this thread: http://www.excelforum.com/showthread...hreadid=569812 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete info from source file w/out changing the destination file | New Users to Excel | |||
Retaining cell reference in destination, when sorting source file | Excel Worksheet Functions | |||
Linked File Calcuation req. source file to be open | Excel Discussion (Misc queries) | |||
Automatic update of links in destination file when source file mo. | Excel Discussion (Misc queries) | |||
"file not found" error message when launching source file | Excel Programming |