Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Workbook name


Hi,

I need to have the name of the workbook in cell a1 but without the
".xls"
If I do:
Range("a1").Value = ActiveWorkbook.Name
I get the NAME.xls

Thanks,
M


--
michal
------------------------------------------------------------------------
michal's Profile: http://www.excelforum.com/member.php...o&userid=24404
View this thread: http://www.excelforum.com/showthread...hreadid=386137

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Workbook name


Left(ActiveWorkbook.Name, Instr(ActiveWorkbook.Name,".")-1) will give
you what you are looking for.


--
Rich_z
------------------------------------------------------------------------
Rich_z's Profile: http://www.excelforum.com/member.php...o&userid=24737
View this thread: http://www.excelforum.com/showthread...hreadid=386137

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Workbook name

I would use InstrRev, some people (I do :-)) put dots in their filenames

Left(ActiveWorkbook.Name, InStrRev(ActiveWorkbook.Name, ".") - 1)

--
HTH

Bob Phillips

"Rich_z" wrote in
message ...

Left(ActiveWorkbook.Name, Instr(ActiveWorkbook.Name,".")-1) will give
you what you are looking for.


--
Rich_z
------------------------------------------------------------------------
Rich_z's Profile:

http://www.excelforum.com/member.php...o&userid=24737
View this thread: http://www.excelforum.com/showthread...hreadid=386137



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Workbook name

I'd just assume it is a length of 4

Left(ActiveWorkbook.Name, len(ActiveWorkbook.Name) - 4)

--
Regards,
Tom Ogilvy


"Bob Phillips" wrote in message
...
I would use InstrRev, some people (I do :-)) put dots in their filenames

Left(ActiveWorkbook.Name, InStrRev(ActiveWorkbook.Name, ".") - 1)

--
HTH

Bob Phillips

"Rich_z" wrote in
message ...

Left(ActiveWorkbook.Name, Instr(ActiveWorkbook.Name,".")-1) will give
you what you are looking for.


--
Rich_z
------------------------------------------------------------------------
Rich_z's Profile:

http://www.excelforum.com/member.php...o&userid=24737
View this thread:

http://www.excelforum.com/showthread...hreadid=386137





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
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
Multiple workbook user's with Master workbook - all password protected Yvon Excel Discussion (Misc queries) 2 March 30th 05 01:34 PM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM
Open a password protected excel workbook from second workbook to fetch data using dynamic connection kaustav choudhury Excel Programming 2 April 3rd 04 06:18 AM
What commands do you use to name a workbook, save a workbook,open a workbook Steven R. Berke Excel Programming 1 July 24th 03 11:37 PM


All times are GMT +1. The time now is 11:39 PM.

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"