![]() |
Help Retrieving filename without .xls attached
I would like to try and retrieve the filename of the current workbook, without having the ".xls" portion of it attached. I'm currently retrieving the ActiveWorkbook.Name maybe there is a way to parse this or something? Any help is greatly appreciated. Thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Help Retrieving filename without .xls attached
left(activeworkbook.name,len(activeworkbook.name)-4)
-- Regards, Tom Ogilvy Marshall wrote in message ... I would like to try and retrieve the filename of the current workbook, without having the ".xls" portion of it attached. I'm currently retrieving the ActiveWorkbook.Name maybe there is a way to parse this or something? Any help is greatly appreciated. Thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Help Retrieving filename without .xls attached
How about just cutting it down yourself??
Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) Dan E "Marshall" wrote in message ... I would like to try and retrieve the filename of the current workbook, without having the ".xls" portion of it attached. I'm currently retrieving the ActiveWorkbook.Name maybe there is a way to parse this or something? Any help is greatly appreciated. Thanks. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Help Retrieving filename without .xls attached
one way:
Dim fName As String Dim nLen As Integer fName = ActiveWorkbook.Name nLen = Len(fName) - 3 If Mid(fName, nLen, 1) = "." Then _ fName = Left(fName, nLen - 1) In article , Marshall wrote: I would like to try and retrieve the filename of the current workbook, without having the ".xls" portion of it attached. I'm currently retrieving the ActiveWorkbook.Name maybe there is a way to parse this or something? Any help is greatly appreciated. Thanks. |
All times are GMT +1. The time now is 10:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com