Results 1 to 2 of 2
  1. #1
    Kluaoha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2017
    Posts
    20

    CopyFromRecordset on Multi-Area ranges?

    I wish to export data to a multi-area range on an Excel sheet. I have it as a named range, "Data", and the following just writes the records as a contiguous chunk:
    Code:
    ...
    Dim XLsht As Excel.Worksheet
    Dim rs As DAO.Recordset
    ...
    XLsht.range("Data").CopyFromRecordset rs
    Is there any way to do this without having to go cell by cell?
    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    I expect not. Either break up the range into multiple named ranges and do multiple exports or code that writes cell by cell.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 05-17-2017, 10:45 AM
  2. Need a Tutor in my area - pay hourly
    By allavald in forum General Chat
    Replies: 1
    Last Post: 09-23-2014, 10:50 AM
  3. Replies: 4
    Last Post: 07-14-2014, 02:26 PM
  4. Replies: 3
    Last Post: 03-12-2013, 11:34 AM
  5. Detail area of form help
    By Darkmatter5 in forum Forms
    Replies: 1
    Last Post: 07-10-2012, 04:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums