View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Retieve Workbook Name via code

Hi,

This puts all open workbook naames in a message box which you should be able
to adapt:-

Sub seeemall()
Dim wkb As Workbook
For Each wkb In Workbooks
If Windows(wkb.Name).Visible Then _
MsgBox (wkb.Name)
Next
End Sub

Mike

"RobN" wrote:

Is there some code that will retrieve a workbook name?

What I'm trying to do within some code (in an xl template) is to activate
the workbook again after the procedure has done some activity in another
workbook. But the workbook that has the code in it doesn't always have the
same name.

Rob