![]() |
Extract workbook name within a macro
I need to extract a workbook name within a macro. Ultimately I need th
ability to have the name as a string value within my macro to use t paste portions of the name within a cell. I have various macros tha will extract the filename, etc. but I need the ability to have th filename as a string. Any idea on the code required for this action? Thanks -- Message posted from http://www.ExcelForum.com |
Extract workbook name within a macro
reply: Try saving the name to a variable
dim x as string x= activesheet.name -----Original Message----- I need to extract a workbook name within a macro. Ultimately I need the ability to have the name as a string value within my macro to use to paste portions of the name within a cell. I have various macros that will extract the filename, etc. but I need the ability to have the filename as a string. Any idea on the code required for this action? Thanks! --- Message posted from http://www.ExcelForum.com/ . |
Extract workbook name within a macro
You can use ThisWorkbook.Path & Application.PathSeparator &
ThisWorkbook.Name -- Rob van Gelder - http://www.vangelder.co.nz/excel "waveracerr " wrote in message ... I need to extract a workbook name within a macro. Ultimately I need the ability to have the name as a string value within my macro to use to paste portions of the name within a cell. I have various macros that will extract the filename, etc. but I need the ability to have the filename as a string. Any idea on the code required for this action? Thanks! --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 12:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com