+ Reply to Thread
Results 1 to 3 of 3

Code not copying data from re-Dim'd columns

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,398

    Code not copying data from re-Dim'd columns

    Hope someone can see the flaw here.

    Attached file 150219 Array test.xls should find and paste all the records in Database Cols J and M - P that match the date set as the "Target" in Col A of the Date Sheet.

    Code below identifies the Column Headers and sets up the autofilters, but doesn't actually "filter and copy" the records across.

    Please Login or Register  to view this content.
    Hope someone can see the flaw.

    All responses accepted gratefully

    Ochimus

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code not copying data from re-Dim'd columns

    The range being copied is J1, M1:P1.

    This is probably because ws.Cells(1).CurrentRegion.Resize(, Application.Max(TDate.Column, PDate.Column, LPrs.Column, Now.Column, NPrc.Column)) refers to A1:P1.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,398

    Re: Code not copying data from re-Dim'd columns

    Norie,

    I can only apologise for this. I was sure I replied immediately thanking you for your prompt response and clarification, but I was just looking at previous activity and couldn't find it!

    So - belatedly - thank you very much for the help.

    Ochimus

+ 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. Code for copying columns One below the other
    By aravindhan_31 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-20-2014, 02:18 AM
  2. [SOLVED] Need a macro code for matching a data and copying multiple columns
    By faizaan316 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-14-2013, 01:40 PM
  3. [SOLVED] Code from tigeravatar ,Copying data from one sheet and copying it
    By DanielRay in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-07-2012, 03:07 PM
  4. Replies: 1
    Last Post: 04-09-2012, 09:21 AM
  5. Replies: 1
    Last Post: 11-22-2011, 02:36 PM

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