View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Valeria Valeria is offline
external usenet poster
 
Posts: 127
Default determine the active workbook containing a specific sheet

Dear experts,
I am trying to determine within my open workbooks the one that contains the
sheet "Instructions", workbook that I would like to activate.
My code (not working!) is the following:

i = 0
Do
i = i + 1
Loop Until IsError(Workbooks(i).Worksheets("Instructions")) = False
Workbooks(i).Activate
WBReport = Workbooks(i).Name

Could you please help me?
Many thanks!
Best regards,

--
Valeria