Thread: Active Workbook
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AA2e72E AA2e72E is offline
external usenet poster
 
Posts: 400
Default Active Workbook

In a Module, try:

Sub aa()
If Workbooks(1).Name = "wb1" Then
Workbooks(2).Activate
Else
Workbooks(1).Activate
End If
End Sub