Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 30th, 2011, 01:48 PM
Authorized User
 
Join Date: Aug 2011
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to switch between 2 opened excels

Hi,

Can anyone please help me with a macro to switch between two opened excels without opening them again.

Thanks
Justin
 
Old October 14th, 2011, 01:37 PM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by justinferns View Post
Hi,

Can anyone please help me with a macro to switch between two opened excels without opening them again.

Thanks
Justin
Do you mean two separate copies of Excel? Use Alt+Tab. Otherwise you'll need to use Windows API calls to find the second instance of Excel (someone correct me if I'm wrong).
__________________
Regards,
JP
JP SoftTech
 
Old October 15th, 2011, 04:43 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

If you are looking at making some workbook active you can do that by

Workbooks("Sample 1.xls").activate

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old October 26th, 2011, 10:03 AM
Authorized User
 
Join Date: Aug 2011
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Shasur.. It works! :)

Justin
 
Old November 11th, 2011, 03:19 AM
Registered User
 
Join Date: Nov 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

by activating in your macro shell program





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Excels formula to acrobat javascript jenawyn Javascript How-To 0 April 6th, 2011 07:03 PM
Database cannot be opened GeeTee991100 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 9 December 9th, 2010 11:31 AM
Sever has not yet been opened ravee789 Crystal Reports 2 October 20th, 2003 06:56 AM
Server not yet opened sathishraj Crystal Reports 1 October 15th, 2003 08:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.