+ Reply to Thread
Results 1 to 3 of 3

Macro to Open File/s and copy data won't work

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Macro to Open File/s and copy data won't work

    I have written code to open data and select a file/s and then to copy the data from sheet1 to sheet imported data

    When running the macro, I get run time error-Application defined or object defined error

    The following part of the code is highlighted

    Please Login or Register  to view this content.

    See full code below


    Please Login or Register  to view this content.


    I have attached my destination workbook containing the macro "Import Payment Data.xls" as well as my source workbook

    It would be appreciated if someone could assist me
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro to Open File/s and copy data won't work

    Version difference of Rows.Count
    Change to
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to Open File/s and copy data won't work

    Thanks for pointing out where the problem lay


    have tested-code now works perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to open file, filter data and copy to another workbook/sheets
    By mati_WAR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2017, 10:09 AM
  2. Macro open a file and copy the data
    By Mr.India in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2015, 10:33 PM
  3. [SOLVED] cannot work out how to open a .chm help file in a macro
    By jmac1947 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2014, 06:17 AM
  4. [SOLVED] Macro to copy the data from a closed file to another work book using filters
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-26-2014, 12:50 PM
  5. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  6. Open Separate File, Copy Data and Paste Macro
    By boohah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2010, 02:04 PM
  7. Macro to Open File & Copy Data
    By jamesryan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2008, 10:19 AM

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