Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Mark" schrieb im Newsbeitrag ... I am using Excel 97. Can someone please assist me with some code which gives me as a string the activeworkbook.name without the ".xls" at the end? Thanks -- Mark Hi Mark, try left(ActiveWorkbook.Name,len(ActiveWorkbook.Name)-4) cheers, Stephan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try InStrRev() and look for the dot, in case the suffix is more or less than
3 characters. -- Stefano Gatto "Dr. Stephan Kassanke" wrote: "Mark" schrieb im Newsbeitrag ... I am using Excel 97. Can someone please assist me with some code which gives me as a string the activeworkbook.name without the ".xls" at the end? Thanks -- Mark Hi Mark, try left(ActiveWorkbook.Name,len(ActiveWorkbook.Name)-4) cheers, Stephan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't think InStrRev was around in 97.
"Stefano Gatto" wrote: Try InStrRev() and look for the dot, in case the suffix is more or less than 3 characters. -- Stefano Gatto "Dr. Stephan Kassanke" wrote: "Mark" schrieb im Newsbeitrag ... I am using Excel 97. Can someone please assist me with some code which gives me as a string the activeworkbook.name without the ".xls" at the end? Thanks -- Mark Hi Mark, try left(ActiveWorkbook.Name,len(ActiveWorkbook.Name)-4) cheers, Stephan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good point!
So do this: Function strFilenameWithoutExtension(strFilename As String) As String Dim intPos As Integer For intPos = Len(strFilename) To 1 Step -1 If Mid(strFilename, intPos, 1) = "." Then strFilenameWithoutExtension = Mid(strFilename, 1, intPos - 1) Exit For End If Next intPos End Function -- Stefano Gatto "cush" wrote: I don't think InStrRev was around in 97. "Stefano Gatto" wrote: Try InStrRev() and look for the dot, in case the suffix is more or less than 3 characters. -- Stefano Gatto "Dr. Stephan Kassanke" wrote: "Mark" schrieb im Newsbeitrag ... I am using Excel 97. Can someone please assist me with some code which gives me as a string the activeworkbook.name without the ".xls" at the end? Thanks -- Mark Hi Mark, try left(ActiveWorkbook.Name,len(ActiveWorkbook.Name)-4) cheers, Stephan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filename extract from Filepath Text String | Excel Discussion (Misc queries) | |||
Nested String Filename Variable | Excel Worksheet Functions | |||
Macro to open most recent file with a particular filename string | Excel Discussion (Misc queries) | |||
substitute the filename in a cell reference with a string in another cell. | Excel Discussion (Misc queries) | |||
How to activate a file when the filename is represented by a string variable | Excel Programming |