One Excel spreadsheet accessing another using VBA


Posted by TomH on December 03, 2001 6:28 AM

Using VBA, how does my first Excel spreadsheet access the value of cell 'A1' on sheet 'test' of 'junk.xls'?

Both spreadsheets are open in separate windows at the same time.

Thanks in advance.



Posted by Dank on December 03, 2001 7:48 AM

Sub GetValue()
Dim v

v = Workbooks("Junk.xls").Sheets("test").Range("A1").Value

MsgBox v

End Sub

Regards,
Daniel.