Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
Multiple workbook user's with Master workbook - all password protected | Excel Discussion (Misc queries) | |||
Copy a range of cells in an unopened workbook and paste it to the current workbook | Excel Programming | |||
Open a password protected excel workbook from second workbook to fetch data using dynamic connection | Excel Programming | |||
What commands do you use to name a workbook, save a workbook,open a workbook | Excel Programming |