ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook Name (https://www.excelbanter.com/excel-programming/357976-workbook-name.html)

bobwilson[_17_]

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


John[_88_]

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




Martin

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



Bob Phillips[_6_]

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




Stefi

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



bobwilson[_18_]

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



All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com