Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pp pp is offline
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need sample for reading value from and writing value to cell E53 from outside Excel Tony Bansten Excel Discussion (Misc queries) 1 June 17th 08 07:03 AM
Reading Only Numeric Value of Cell F. Lawrence Kulchar Excel Discussion (Misc queries) 5 April 9th 08 01:58 AM
Reading a cell in VBA Ruatha New Users to Excel 3 June 11th 06 04:01 PM
Reading last cell jackh7777777 Excel Discussion (Misc queries) 2 May 26th 06 01:28 AM
Cell Reading Problem Shashi Bhosale Excel Programming 2 July 22nd 04 01:37 PM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"