+ Reply to Thread
Results 1 to 3 of 3

VBA code Copy data into one file

  1. #1
    Registered User
    Join Date
    11-05-2008
    Location
    Netherlands
    Posts
    11

    VBA code Copy data into one file

    Hello all

    for a long time i tried to figure out how to make the right vba code for my problem. Found some examples already but can't succeed to adjust them properly. I lack the knowledge sadly. Maby someone can help me a bit further.

    In short: i have about 2000 files made in excel. They are all the same. Now i need to copy name of file in A2, from sheet "Algemeen" D3 in B2, D6 in B3. If there is no data in them i need a warning like *empty , (but thats not stricktly necessary, I also need more data from othersheets but i hope i can figure out that myself later). I found an example code from rondebruin. It works when using his examplefile but when putting into another folder i get a error. Next is how can i "range" the cells; maby i understand "ranging" wrong? SourceRng:="D3,D6", doesnt work. If this code is not suitable can someone send me a link where i can find a better one?

    many thanks already.

    greetings PeterDV
    --------------
    Please Login or Register  to view this content.
    Last edited by PeterDV; 11-05-2008 at 11:23 AM. Reason: add code tags

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re:VBA code Copy data into one file

    Please edit your original thread and put your code between code brackets
    Please Login or Register  to view this content.
    Is this all the code Ron de Bruin provided? Are all the files in the same Folder (Directory) or are there sub folders? Have you search the rest of the furum RoyUK has provided some interesting Code.
    http://www.excelforum.com/excel-prog...readsheet.html
    Last edited by rwgrietveld; 11-05-2008 at 11:14 AM.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Registered User
    Join Date
    11-05-2008
    Location
    Netherlands
    Posts
    11
    Sorry i hope the edit is ok now.
    His code was longer but i thought it was unneccessary it was ment for copying sheets into one file. Let me first ceck your link and thank you for that.

    greetings PeterDV

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1