View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Filename as Data

Shouldn't make any difference how you save it.

Demo'd from the Immediate window on a workbook in excel saved as text.

? activeworkbook.Name
export.txt

? left(activeworkbook.Name,len(ActiveWorkbook.name)-4)
export

Perhaps you need to be more specific about how it doesn't work.

--
regards,
Tom Ogilvy


"Jim at SDSU" wrote in message
...
That's "almost" it. Works if I save as an XLS first, but never gives a

value
if it remains a text file. "cell (filename) " would work except it is the
full path instead of just the file name. I was hoping there was a VB

function
that just says "insert the filename without the extension as text here"
I do appreciate your time though.


"Tom Ogilvy" wrote:

Range("B1").Value = left(activeworkbook.Name,len(ActiveWorkbook.name)-4)