View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default VBA Identify Workbook

Hi

It's strictly hierarchial:
fromarea.parent.parent.name
(or path or fullname or whatever WB property)

HTH. Best wishes Harald


skrev i melding
...
I need to write a macro that resides in workbook A. Using
Set fromarea = Application.InputBox("Where is the source
data?", , , , , , , 8)
fromarea.parent.name gives me the name of the worksheet
that I referenced (in another workbook). I need a way to
identify the workbook name as well. It is not
activeworkbook or thisworkbook.

Thanks.