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

I'm sure this must be a simple one but I cannot get my stupin brain around
it!
the line of code " Openbook =activeWorkbook.name" returns a string with the
workbook name including the ".xls". The question is how do I strip out the
".xls" from the string?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Variable for workbook name

OpenBook = ActiveWorkbook.Name
OpenBook = Left(OpenBook,Len(OpenBook)-4)

--
Regards,
Tom Ogilvy

"Mervyn Thomas" wrote in message
...
I'm sure this must be a simple one but I cannot get my stupin brain around
it!
the line of code " Openbook =activeWorkbook.name" returns a string with

the
workbook name including the ".xls". The question is how do I strip out

the
".xls" from the string?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Variable for workbook name


"Mervyn Thomas" wrote in message
...
I'm sure this must be a simple one but I cannot get my stupin brain around
it!
the line of code " Openbook =activeWorkbook.name" returns a string with

the
workbook name including the ".xls". The question is how do I strip out

the
".xls" from the string?



Openbook = Left$( Openbook, Len( Openbook) - 4)

Iain King


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
pass variable from one workbook to another calebjill Excel Discussion (Misc queries) 2 January 28th 09 07:38 PM
Vlookup using a variable for the workbook name Phil Excel Discussion (Misc queries) 4 November 10th 08 09:30 PM
Can not set WorkBook variable jlclyde Excel Discussion (Misc queries) 5 March 6th 08 09:46 PM
How do I link to a workbook whose name is variable? Carl Borthwick Excel Discussion (Misc queries) 1 January 13th 06 10:01 AM
workbook as variable pete Excel Programming 2 January 25th 04 09:20 PM


All times are GMT +1. The time now is 08:04 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"