Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA 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 May 6th, 2004, 03:01 PM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Macro to copy data from one file to a 2nd file

I am new here but here is the gist of what I need help on.

I have 2 excel files. One will be the Master data holder. The second is the input file.

I want to write a macro that will run from the input excel file that will find the first empty row in the master available and then copy a set of lines from the "input" file into the "master" file.

The help I need is how to open and run using these 2 different files. I already can run the copy commands once I can link the two excel files. I am using the "ActiveSheet.Cells(NUM, 2).Value = Worksheets("IF").Cells(2, 4)" command to copy between sheets. I just need to know the next step of going to a new workbook.

Whatever help is available would be much appreciated.

Thanks,

Chad Podsednik
 
Old October 29th, 2004, 10:40 AM
Authorized User
 
Join Date: Oct 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shattered Send a message via Yahoo to shattered
Default

It depends on how you want this to work but if all you want to do is open the file then

Workbooks.Open Filename:=xlPath

where xlPath is the path of the file (inc file name & ext)

if you have more sepcific questions I'd be happy to help








Similar Threads
Thread Thread Starter Forum Replies Last Post
DTS ignores a 2nd ext when loading a txt file mmusleh SQL Server 2000 5 July 24th, 2007 01:53 PM
Macro in .dot file produces error... ismith Word VBA 2 March 13th, 2007 09:23 AM
execute an excel macro via a .vbs file ismailc VB.NET 2002/2003 Basics 1 January 11th, 2007 04:19 PM
How to copy file? eapsokha Classic ASP Databases 2 November 14th, 2003 11:44 AM





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