Generic Workbook Select

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi! This is a really easy one, but I can't seem to find
the answer. I was wondering what the code is to
generically activate the other open workbook in Excel
without naming it proper. Something like this (but not
this obviously):

Workbooks.Next.Select

Thanks!

Sincerely,

Michael
 
Hi Michael,

Here is one way

Dim wb
For Each wb In Workbooks
If wb.Name <> ActiveWorkbook.Name Then
wb.Activate
End If
Next wb

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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