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


How do I automate the Master Workbook Name being added to a cell in m
worksheet. Right now I manually type it. The ActiveWorkbook.FullNam
does not work as it is the full file path.

Dim masterWB As String ' Master Workbook Name
masterWB = Range("C138") ' C138 is the Workbook Nam

--
bobwilso
-----------------------------------------------------------------------
bobwilson's Profile: http://www.excelforum.com/member.php...fo&userid=3304
View this thread: http://www.excelforum.com/showthread.php?threadid=52959

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

You just need the Name property:

ActiveWorkbook.Name

which will give you "AWorkbook.xls"

Best regards

John


"bobwilson" wrote
in message ...

How do I automate the Master Workbook Name being added to a cell in my
worksheet. Right now I manually type it. The ActiveWorkbook.FullName
does not work as it is the full file path.

Dim masterWB As String ' Master Workbook Name
masterWB = Range("C138") ' C138 is the Workbook Name


--
bobwilson
------------------------------------------------------------------------
bobwilson's Profile:
http://www.excelforum.com/member.php...o&userid=33046
View this thread: http://www.excelforum.com/showthread...hreadid=529596



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default Workbook Name

masterWB = ActiveWorkbook.Name

"bobwilson" wrote:


How do I automate the Master Workbook Name being added to a cell in my
worksheet. Right now I manually type it. The ActiveWorkbook.FullName
does not work as it is the full file path.

Dim masterWB As String ' Master Workbook Name
masterWB = Range("C138") ' C138 is the Workbook Name


--
bobwilson
------------------------------------------------------------------------
bobwilson's Profile: http://www.excelforum.com/member.php...o&userid=33046
View this thread: http://www.excelforum.com/showthread...hreadid=529596


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Workbook Name

See http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"bobwilson" wrote
in message ...

How do I automate the Master Workbook Name being added to a cell in my
worksheet. Right now I manually type it. The ActiveWorkbook.FullName
does not work as it is the full file path.

Dim masterWB As String ' Master Workbook Name
masterWB = Range("C138") ' C138 is the Workbook Name


--
bobwilson
------------------------------------------------------------------------
bobwilson's Profile:

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Workbook Name

Enter this formula in cell C138
=LEFT(MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,255),FIND("]",MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,255))-1)

Regards,
Stefi


€˛bobwilson€¯ ezt Ć*rta:


How do I automate the Master Workbook Name being added to a cell in my
worksheet. Right now I manually type it. The ActiveWorkbook.FullName
does not work as it is the full file path.

Dim masterWB As String ' Master Workbook Name
masterWB = Range("C138") ' C138 is the Workbook Name


--
bobwilson
------------------------------------------------------------------------
bobwilson's Profile: http://www.excelforum.com/member.php...o&userid=33046
View this thread: http://www.excelforum.com/showthread...hreadid=529596




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


Thanks Works Great

--
bobwilso
-----------------------------------------------------------------------
bobwilson's Profile: http://www.excelforum.com/member.php...fo&userid=3304
View this thread: http://www.excelforum.com/showthread.php?threadid=52959

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
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook burl_rfc Excel Programming 1 April 1st 06 08:48 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 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
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:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"