Extract workbook name within a macro

  • Thread starter Thread starter waveracerr
  • Start date Start date
W

waveracerr

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
 
reply: Try saving the name to a variable

dim x as string
x= activesheet.name
 
You can use ThisWorkbook.Path & Application.PathSeparator &
ThisWorkbook.Name
 

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

Back
Top