Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Strip file extension from fiel name with multiple periods."file.9.69.txt"
I am using this to strip the file extension off of a file name
Range("G6").Value = Left(ActiveWorkbook.Name, InStr (ActiveWorkbook.Name, ".") - 1) It messes up with multiple "." How do I strip off the file extension and far right "." only? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Strip file extension from fiel name with multiple periods. "file.9
Try using INSTRREV , it gets the first "." from the end.
-- HTH, Barb Reinhardt "Fan924" wrote: I am using this to strip the file extension off of a file name Range("G6").Value = Left(ActiveWorkbook.Name, InStr (ActiveWorkbook.Name, ".") - 1) It messes up with multiple "." How do I strip off the file extension and far right "." only? . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Strip file extension from fiel name with multiple periods. "file.9.69.txt"
On Tue, 19 Jan 2010 15:23:01 -0800 (PST), Fan924 wrote:
I am using this to strip the file extension off of a file name Range("G6").Value = Left(ActiveWorkbook.Name, InStr (ActiveWorkbook.Name, ".") - 1) It messes up with multiple "." How do I strip off the file extension and far right "." only? Perhaps: Left(activeworkbook.name, InStrRev(fn, ".") - 1) --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Excel Discussion (Misc queries) | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Setting up and Configuration of Excel | |||
"Open With" Excel Does Not Work For TXT File Extension | Excel Discussion (Misc queries) | |||
Why does my excel file have an extension reading ".xls:1"? | Excel Discussion (Misc queries) | |||
Problem- Recording macros for "file save" and "File open" | Excel Programming |