Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Switching Workbooks in vbscript

Hello all and thanks for any help that you can provide. I am trying to
switch between two open workbooks in excel using vbscript. I am able to
open one workbook and create another just fine, but the act of switching
workbooks to copy data from one to the other is kinda stumping me. I just
know it is something fairly simple, but I cannot seem to remember the
command. I tried:

objxl.Workbooks("Book1").Select

but received an error. Any help at all on this would be greatly
appreciated.

Thanks,

Joe


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Switching Workbooks in vbscript

Hi,

Try this:

Selection.Copy
Windows("main.xls").Activate
Sheets("Sheet1").Range("A1").Select
Selection.Paste

Kate


-----Original Message-----
Hello all and thanks for any help that you can provide.

I am trying to
switch between two open workbooks in excel using

vbscript. I am able to
open one workbook and create another just fine, but the

act of switching
workbooks to copy data from one to the other is kinda

stumping me. I just
know it is something fairly simple, but I cannot seem to

remember the
command. I tried:

objxl.Workbooks("Book1").Select

but received an error. Any help at all on this would be

greatly
appreciated.

Thanks,

Joe


.

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
Run VBScript from Excel Amy M Excel Discussion (Misc queries) 4 September 19th 08 09:07 PM
Switching between Workbooks Doekoe Excel Discussion (Misc queries) 0 May 5th 08 10:54 AM
Switching between workbooks Jim Excel Discussion (Misc queries) 5 July 28th 07 03:19 AM
Pastespecial via vbscript not working msnews.microsoft.com[_7_] Excel Programming 2 December 20th 03 02:37 PM
How to do selection.subtotal in VBScript/ASP ? Wes[_5_] Excel Programming 3 December 9th 03 09:43 PM


All times are GMT +1. The time now is 09:55 AM.

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

About Us

"It's about Microsoft Excel"