LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default File Location code

Hello All,

I'm using the following modified code that was posted
by "Dan E." several weeks ago to write the path of a file
out to a cell. Below is the code:

FileName = Application.GetOpenFilename("Text Files _
(*.txt), *.txt")
CellLocation = Len(FileName) + 1 - InStr(1, StrReverse _
(FileName), "\")
FilePath = Mid(FileName, 1, CellLocation)
Range("G46").Value = FilePath

When I run this code using Excel 97, it gives me the
following error: Sub or Funtion not defined for
"StrReverse". Works fine on Excel 2K, what am I missing?

Thanks in advance,
Rohit
 
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
Code for a button to change cell location Michael B Excel Discussion (Misc queries) 1 November 30th 07 04:30 PM
file location DaveB Excel Discussion (Misc queries) 4 July 7th 07 10:02 PM
Get File location Jeff Excel Discussion (Misc queries) 2 September 26th 06 08:20 PM
Location of XLB file? Doug Kanter Excel Discussion (Misc queries) 5 February 28th 06 12:40 AM
Specify file location Shunt Excel Programming 0 July 28th 03 04:49 PM


All times are GMT +1. The time now is 08:53 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"