Variable for workbook name

  • Thread starter Thread starter Mervyn Thomas
  • Start date Start date
M

Mervyn Thomas

I'm sure this must be a simple one but I cannot get my stupin brain around
it!
the line of code " Openbook =activeWorkbook.name" returns a string with the
workbook name including the ".xls". The question is how do I strip out the
".xls" from the string?
 
OpenBook = ActiveWorkbook.Name
OpenBook = Left(OpenBook,Len(OpenBook)-4)
 
Mervyn Thomas said:
I'm sure this must be a simple one but I cannot get my stupin brain around
it!
the line of code " Openbook =activeWorkbook.name" returns a string with the
workbook name including the ".xls". The question is how do I strip out the
".xls" from the string?

Openbook = Left$( Openbook, Len( Openbook) - 4)

Iain King
 

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