Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading a CELL value from another Excel
Hi Folks
I have 2 Excel file(s) File 1: ConnectionString.xls This has a worksheet : GlobalConnString In this worksheet, I have a TEXT value defined in the cell A1 File 2: MyReport.xls This has a worksheet : Report-1 Requirement ======== Using VBA Code, I want to read the value in this worksheet from the file <File1.<Worksheet1.<Cell1 <ConnectionString.xls.<ConnString.<A1 Is this possible? If so, could somebody please let me know how? Thanks PP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading a CELL value from another Excel
Sub foo() Dim strConn As String 'Fully qualified (tunnelled) object reference strConn = Workbooks("Connectionstring.xls").Worksheets("Glob alConnString").Range(" A1").Value debug.print strConn 'Or via a global range.. strConn = Range("'[Connectionstring.xls]GlobalConnString'!A1").Value debug.print strConn End Sub -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam PP wrote : Hi Folks I have 2 Excel file(s) File 1: ConnectionString.xls This has a worksheet : GlobalConnString In this worksheet, I have a TEXT value defined in the cell A1 File 2: MyReport.xls This has a worksheet : Report-1 Requirement ======== Using VBA Code, I want to read the value in this worksheet from the file <File1.<Worksheet1.<Cell1 <ConnectionString.xls.<ConnString.<A1 Is this possible? If so, could somebody please let me know how? Thanks PP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need sample for reading value from and writing value to cell E53 from outside Excel | Excel Discussion (Misc queries) | |||
Reading Only Numeric Value of Cell | Excel Discussion (Misc queries) | |||
Reading a cell in VBA | New Users to Excel | |||
Reading last cell | Excel Discussion (Misc queries) | |||
Cell Reading Problem | Excel Programming |