Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To 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 October 23rd, 2007, 06:08 AM
Registered User
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Working with excel sheets

Hi All,
I'm having three excel files, book1.xls, book2.xls, book3.xls and each having data in sheet1. I want to copy these three sheets to book4.xls as into sheet1, sheet2, sheet3. Please help me. How to code in VB6.
thanks in advance.
regards
ramsri

ramsri
 
Old October 25th, 2007, 03:15 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I would open B4, and 1 at a time open B1 — B3.

Create a WorkSheet object, and set it, in turn, to S1 of B1 — B3.

Then use B4’s WorkSheets.Add method to add the current Sheet being held in the WorkSheet object.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing two excel sheets nbkn8ct Excel VBA 5 August 28th, 2009 05:20 PM
Import From excel with n sheets dbellavi SQL Server DTS 1 September 11th, 2007 07:51 AM
Exporting Table to Excel Sheets ayazhoda Access VBA 11 April 5th, 2007 07:25 AM
How to read values from excel sheets gurusamy.senthil Beginning VB 6 0 May 8th, 2006 07:11 AM
MX2004 Can't Import Excel Sheets koolkat67 Dreamweaver (all versions) 0 February 17th, 2006 06:00 PM





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