Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
Hi everyone! This is my first post on this board :) I just want to know how I can do the following in VBA: =[Book1998.xls]Sheet1!$F$1 Thanks! Matt -- mattsva ----------------------------------------------------------------------- mattsvai's Profile: http://www.excelforum.com/member.php...fo&userid=3113 View this thread: http://www.excelforum.com/showthread.php?threadid=50798 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
Workbooks("Book 1998.xls").Worksheets("Sheet1").Range("F1")
the range has many properties such as .Value, .Formula, etc. which can tag ob the end. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "mattsvai" wrote in message ... Hi everyone! This is my first post on this board :) I just want to know how I can do the following in VBA: =[Book1998.xls]Sheet1!$F$1 Thanks! Matts -- mattsvai ------------------------------------------------------------------------ mattsvai's Profile: http://www.excelforum.com/member.php...o&userid=31134 View this thread: http://www.excelforum.com/showthread...hreadid=507987 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
Thanks for the reply Bob, That is exactly the first thing that came to mind.... but I could never get it to work so I assumed I was way off. This is what I have been doing: ---- Sub import() Dim var As String var = Workbooks("master.xls").Worksheets("Sheet1").Range ("A2") MsgBox var End Sub ------- Yet I always get an "Out of Range" error Any ideas would be appreciated :) Thanks again, Matts -- mattsvai ------------------------------------------------------------------------ mattsvai's Profile: http://www.excelforum.com/member.php...o&userid=31134 View this thread: http://www.excelforum.com/showthread...hreadid=507987 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
Thanks for the reply Bob, That is exactly the first thing that came to mind.... but I could never get it to work so I assumed I was way off. This is what I have been doing: ---- Sub import() Dim var As String var = Workbooks("master.xls").Worksheets("Sheet1").Range ("A2") MsgBox var End Sub ------- Yet I always get an "Out of Range" error Any ideas would be appreciated :) Thanks again, Matts -- mattsvai ------------------------------------------------------------------------ mattsvai's Profile: http://www.excelforum.com/member.php...o&userid=31134 View this thread: http://www.excelforum.com/showthread...hreadid=507987 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
Thanks for the reply Bob, That is exactly the first thing that came to mind.... but I could never get it to work so I assumed I was way off. This is what I have been doing: ---- Sub import() Dim var As String var = Workbooks("master.xls").Worksheets("Sheet1").Range ("A2") MsgBox var End Sub ------- Yet I always get an "Out of Range" error Any ideas would be appreciated :) Thanks again, Matts -- mattsvai ------------------------------------------------------------------------ mattsvai's Profile: http://www.excelforum.com/member.php...o&userid=31134 View this thread: http://www.excelforum.com/showthread...hreadid=507987 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
Is the workbook you're trying to reference open ?
Things are a bit different if not.... Tim "mattsvai" wrote in message ... Thanks for the reply Bob, That is exactly the first thing that came to mind.... but I could never get it to work so I assumed I was way off. This is what I have been doing: ---- Sub import() Dim var As String var = Workbooks("master.xls").Worksheets("Sheet1").Range ("A2") MsgBox var End Sub ------- Yet I always get an "Out of Range" error Any ideas would be appreciated :) Thanks again, Matts -- mattsvai ------------------------------------------------------------------------ mattsvai's Profile: http://www.excelforum.com/member.php...o&userid=31134 View this thread: http://www.excelforum.com/showthread...hreadid=507987 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
It is meant to be closed... I want to access a cell in an excel fil that is closed : -- mattsva ----------------------------------------------------------------------- mattsvai's Profile: http://www.excelforum.com/member.php...fo&userid=3113 View this thread: http://www.excelforum.com/showthread.php?threadid=50798 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Cell Referencing in VBA?
When faced with that need, I generally test that the workbook is not open, then
open the book as read only, do my stuff, then close the book again if it wasn't open to start with. Bill -------------------- mattsvai wrote: It is meant to be closed... I want to access a cell in an excel file that is closed :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referencing External Data | Excel Discussion (Misc queries) | |||
Indirect referencing of external spreadsheets | Excel Discussion (Misc queries) | |||
External links referencing URL with parameter | Excel Discussion (Misc queries) | |||
referencing external workbook using variables | Excel Programming | |||
Countif failing when referencing an external file | Excel Programming |