Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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.

Reply
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
merge from an attached word doc גולש1 Excel Discussion (Misc queries) 0 December 21st 09 10:07 AM
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
Accessing Attached xls File shannyshanhan Excel Worksheet Functions 0 August 9th 06 10:04 PM
set filename to <filename-date on open bob engler Excel Worksheet Functions 2 July 13th 06 05:11 AM
HELP with statistics on the attached file Swift Excel Discussion (Misc queries) 7 June 26th 06 03:34 AM


All times are GMT +1. The time now is 05:56 AM.

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"