View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default vba, get filename of this workbook

You may want to consider using ThisWorkbook if the workbook with the macro is
not the active workbook.
--
HTH,
Barb Reinhardt



"md" wrote:

On Mar 28, 8:46 pm, md wrote:
I running a vba script inside a workbook. How do I get the complete
path to the workbook and name in which this script runs?

Thanks


ActiveWorkbook.Path + '\' + ActiveWorkbook.Name (that was easy)