ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro (https://www.excelbanter.com/excel-programming/379290-macro.html)

Bundychik

Macro
 
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?


bony_tony

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?



Bundychik via OfficeKB.com

Macro
 
Bundychik wrote:
Thanks for the tip...will try that when I get to work in the morning :)

--
Message posted via http://www.officekb.com


Bundychik via OfficeKB.com

Macro
 
Hey bony_tony

Excellent tip...worked a treat and I got my macro finished before I started
holidays! Thanks for the help!
Cheers
Bundychik



bony_tony wrote:
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

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?


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200612/1


bony_tony

Macro
 
no problemo bundy

Bundychik via OfficeKB.com wrote:
Hey bony_tony

Excellent tip...worked a treat and I got my macro finished before I started
holidays! Thanks for the help!
Cheers
Bundychik



bony_tony wrote:
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

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?


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200612/1




All times are GMT +1. The time now is 01:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com