Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default How to switch between different workbooks?

Hi,

If I want to switch between (activate) different opened excel workbooks,
what code should I use in VBA?
Thanks.

Ivan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How to switch between different workbooks?

Hi Ivan,

If I want to switch between (activate) different opened excel workbooks,
what code should I use in VBA?


Perhaps I misunderstand but:

'=============
Sub Tester03()
Dim WB1 As Workbook, WB2 As Workbook, WB3 As Workbook

Set WB1 = Workbooks("Book1.xls")
Set WB2 = Workbooks("Book2.xls")
Set WB3 = Workbooks("Book3.xls")

WB2.Activate

End Sub
'<<=============

---
Regards,
Norman


"Ivan" wrote in message
...
Hi,

If I want to switch between (activate) different opened excel workbooks,
what code should I use in VBA?
Thanks.

Ivan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default How to switch between different workbooks?

Hi Norman,

Thanks a lot! It helps.

Ivan

"Norman Jones" wrote:

Hi Ivan,

If I want to switch between (activate) different opened excel workbooks,
what code should I use in VBA?


Perhaps I misunderstand but:

'=============
Sub Tester03()
Dim WB1 As Workbook, WB2 As Workbook, WB3 As Workbook

Set WB1 = Workbooks("Book1.xls")
Set WB2 = Workbooks("Book2.xls")
Set WB3 = Workbooks("Book3.xls")

WB2.Activate

End Sub
'<<=============

---
Regards,
Norman


"Ivan" wrote in message
...
Hi,

If I want to switch between (activate) different opened excel workbooks,
what code should I use in VBA?
Thanks.

Ivan




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/ move selected data from workbooks to seperate worksheets or workbooks Positive Excel Worksheet Functions 1 August 30th 07 04:54 PM
Using alt-tab to switch between Excel workbooks under the same session Kjetil Excel Discussion (Misc queries) 0 June 22nd 06 03:39 PM
URGENT: switch excel workbooks and display msgbox ilyaskazi[_15_] Excel Programming 2 June 4th 05 11:56 PM
Switch Workbooks Ronbo Excel Programming 1 February 29th 04 06:58 PM
Switch between workbooks Newbie Excel Programming 1 January 7th 04 09:34 PM


All times are GMT +1. The time now is 04:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"