Thread: Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bony_tony bony_tony is offline
external usenet poster
 
Posts: 76
Default Macro

This macro will take to the next workbook;

Sub Switch_workbooks()
'
' Switch_workbooks Macro
' Macro recorded 13/12/2006 by Tony Gardner
'
ActiveWindow.ActivateNext
End Sub

If you press Ctrl-Tab whilst recording a macro, it will write this
exact code for you

Tony



Bundychik wrote:
I am a beginner to visual basic and need to write a macro to swap between two
workbooks without mentioning any filenames. Can anyone help?