Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel & VBScript

I need to create a vbscript (Not VBA) to copy a worksheet from one workbook
into another workbook.

Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Excel & VBScript

Hello everyone,

I would be interested in the a VBA example.

Thanks,
Himansu

"Bill Ebbing" <Bill wrote in message
...
I need to create a vbscript (Not VBA) to copy a worksheet from one

workbook
into another workbook.

Any help would be appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Excel & VBScript

The macro recorder is your friend. If you know how to do it manually then
you can record the macrothen clean it up or post back here for more help.

--
Don Guillett
SalesAid Software

"Himansu" wrote in message
...
Hello everyone,

I would be interested in the a VBA example.

Thanks,
Himansu

"Bill Ebbing" <Bill
wrote in message
...
I need to create a vbscript (Not VBA) to copy a worksheet from one

workbook
into another workbook.

Any help would be appreciated.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Excel & VBScript

'This will open the file C:\data\ron.xls and copy Sheet1 in the Activeworkbook and then close C:\data\ron.xls

Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\data\ron.xls")
Wb2.Sheets("Sheet1").copy _
after:=Wb1.Sheets(Wb1.Sheets.Count)
Wb2.Close False
Application.ScreenUpdating = True
End Sub

If you need a example with two open workbooks post back


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Himansu" wrote in message ...
Hello everyone,

I would be interested in the a VBA example.

Thanks,
Himansu

"Bill Ebbing" <Bill wrote in message
...
I need to create a vbscript (Not VBA) to copy a worksheet from one

workbook
into another workbook.

Any help would be appreciated.





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel & VBScript

Ron, is this a reply to my request?

"Ron de Bruin" wrote:

'This will open the file C:\data\ron.xls and copy Sheet1 in the Activeworkbook and then close C:\data\ron.xls

Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\data\ron.xls")
Wb2.Sheets("Sheet1").copy _
after:=Wb1.Sheets(Wb1.Sheets.Count)
Wb2.Close False
Application.ScreenUpdating = True
End Sub

If you need a example with two open workbooks post back


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Himansu" wrote in message ...
Hello everyone,

I would be interested in the a VBA example.

Thanks,
Himansu

"Bill Ebbing" <Bill wrote in message
...
I need to create a vbscript (Not VBA) to copy a worksheet from one

workbook
into another workbook.

Any help would be appreciated.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Excel & VBScript

No, to Himansu
See Dave's reply

I would be interested in the a VBA example.




--
Regards Ron de Bruin
http://www.rondebruin.nl


"Bill Ebbing" wrote in message ...
Ron, is this a reply to my request?

"Ron de Bruin" wrote:

'This will open the file C:\data\ron.xls and copy Sheet1 in the Activeworkbook and then close C:\data\ron.xls

Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\data\ron.xls")
Wb2.Sheets("Sheet1").copy _
after:=Wb1.Sheets(Wb1.Sheets.Count)
Wb2.Close False
Application.ScreenUpdating = True
End Sub

If you need a example with two open workbooks post back


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Himansu" wrote in message ...
Hello everyone,

I would be interested in the a VBA example.

Thanks,
Himansu

"Bill Ebbing" <Bill wrote in message
...
I need to create a vbscript (Not VBA) to copy a worksheet from one
workbook
into another workbook.

Any help would be appreciated.







  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Excel & VBScript

Thanks Ron.

"Ron de Bruin" wrote in message
...
'This will open the file C:\data\ron.xls and copy Sheet1 in the

Activeworkbook and then close C:\data\ron.xls

Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\data\ron.xls")
Wb2.Sheets("Sheet1").copy _
after:=Wb1.Sheets(Wb1.Sheets.Count)
Wb2.Close False
Application.ScreenUpdating = True
End Sub

If you need a example with two open workbooks post back


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Himansu" wrote in message

...
Hello everyone,

I would be interested in the a VBA example.

Thanks,
Himansu

"Bill Ebbing" <Bill wrote in message
...
I need to create a vbscript (Not VBA) to copy a worksheet from one

workbook
into another workbook.

Any help would be appreciated.







  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel & VBScript

Maybe something like:

Dim XLApp
Dim XLWkbk1
Dim XLWkbk2

Set XLApp = CreateObject("Excel.Application")
XLApp.Visible = True

Set XLWkbk1 = XLApp.Workbooks.Open("c:\my documents\excel\book1.xls")
Set XLWkbk2 = XLApp.Workbooks.Open("c:\my documents\excel\book2.xls")

XLWkbk1.Worksheets("sheet1").Copy _
XLWkbk2.Worksheets(1)

XLWkbk2.Close True

XLApp.Quit

Set XLWkbk2 = Nothing
Set XLWkbk1 = Nothing
Set XLApp = Nothing


..visible = true is nice for debugging.

Bill Ebbing wrote:

I need to create a vbscript (Not VBA) to copy a worksheet from one workbook
into another workbook.

Any help would be appreciated.


--

Dave Peterson
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
Using excel through vbscript ashtom1 Excel Programming 6 July 6th 05 02:55 PM
vbscript - export to excel ??? amy_mgfe Excel Programming 0 January 16th 05 01:49 PM
embed excel in ie using vbscript balaji kandan Excel Programming 0 November 22nd 03 09:47 AM
how to kill excel using a vbscript Harald Staff[_4_] Excel Programming 0 July 17th 03 10:02 PM


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

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"