Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default opening a file from a cell reference

I think this should be quite straight forward.

I would like to open a text file based on a cell reference

i.e. "example.txt" in cell A1.

Thanks

Simon

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default opening a file from a cell reference

Try
Worksheets(Range("a1").value).activate
--
caroline


" wrote:

I think this should be quite straight forward.

I would like to open a text file based on a cell reference

i.e. "example.txt" in cell A1.

Thanks

Simon


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default opening a file from a cell reference

Hello Simon
Pretty straightforward, yes, provided info in A1 comporises of the full path
and name of the file.
eg:
Sub OpenFileNameFromCell()
With Worksheets("Sheet1")
If .[A1] < "" Then
Workbooks.OpenText .[A1]
End If: End With
End Sub

HTH
Cordially
Pascal

a écrit dans le message de news:
...
I think this should be quite straight forward.

I would like to open a text file based on a cell reference

i.e. "example.txt" in cell A1.

Thanks

Simon



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
how do i set up opening a file from a cell in excel spreadsheet Scott Excel Discussion (Misc queries) 1 September 21st 09 06:01 PM
Linking to another file using file reference typed cell Steven Excel Worksheet Functions 3 April 5th 08 03:15 AM
Opening a file from a cell value EMoe[_89_] Excel Programming 2 December 24th 05 04:53 PM
Extra reference after opening a file David Liebtag Excel Programming 3 January 27th 05 11:19 PM
How? to go to cell when opening file dpj Excel Programming 3 October 12th 03 06:04 PM


All times are GMT +1. The time now is 03:28 AM.

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"