View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bill Ebbing[_2_] Bill Ebbing[_2_] is offline
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.