LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
wattkisson
 
Posts: n/a
Default

Thanks. INDIRECT did the trick.

"Keyur" wrote:


following is a code i am using in one of my spreadsheet to do similar
thing. the only difference might the fact that i am retreiving same
cell (A3) form each file.


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim flnm As String
Application.EnableEvents = False
If Target.Column = 1 And IsEmpty(Target.Value) = False Then
flnm = "C:\Documents and Settings\kapatel\Desktop\" & Target.Value & ".xls"
If Dir(flnm) < "" Then
Me.Cells(Target.Row, 2).Formula = "='C:\Documents and Settings\kapatel\Desktop\[" & Target.Value & ".xls]Details'!$A$3"
Else
Me.Cells(Target.Row, 2).Value = "File not found."
End If
ElseIf IsEmpty(Target.Value) = True Then
Me.Cells(Target.Row, 2).Value = "File not found."
End If
Application.EnableEvents = True
End Sub

--------------------


Hope this helped

Keyur


--
Keyur
------------------------------------------------------------------------
Keyur's Profile: http://www.excelforum.com/member.php...fo&userid=7786
View this thread: http://www.excelforum.com/showthread...hreadid=385705


 
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
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
Filename in a cell phica dk Excel Worksheet Functions 3 November 16th 04 04:14 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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

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

About Us

"It's about Microsoft Excel"