Workbook Name

B

bobwilson

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
 
J

John

You just need the Name property:

ActiveWorkbook.Name

which will give you "AWorkbook.xls"

Best regards

John
 
G

Guest

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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top