Page 3 of 3 FirstFirst 123
Results 31 to 37 of 37
  1. #31
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    First the range was 3 columns, now it is one?
    Make your mind up.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  2. #32
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,365
    @WGM hahahah yeh good point, there is 3 columns and as you have spotted, setting range to 1

    so i guess if am correct, either stick with definitive (CJ's)

    Code:
    Set xlRange = xlSheet.Range("A1:C256")
    Or if i change intFR and intLR to search for rows

    Code:
    Set xlRange = xlSheet.Range("A" & intFR & ":C" & intLR)
    That would do it wouldn't it ?

    Kindest to you and everyone

  3. #33
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Surely you only need to do this once? Once you have the codes, that is that.
    A lot of work for just that?

    And if for some strange reason it is not a one off, then I would be opening an empty recordset, not selecting everything that is already in the table, as we are just appending?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #34
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,365
    Yes correct, once imported that would that task done, but i am more than certain i can use the method in future (now saved to code table where i save)

    Like mentioned, done lots of Access to Excel, Word, Powerpoint, never in reverse, but can only learn and build from this task, knowledge is power

  5. #35
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Well pay attention to what a recordset will contain when you are just appending.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #36
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If this is "one-off", could maybe have just copy/pasted?
    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.

  7. #37
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,365
    Hi June7 yes of course, its one of those tasks where i will use elswhere, build / learn from it....

    thanks agian for your input and to all

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Import Excel data cell by cell into an Access table.
    By russmann2000 in forum Import/Export Data
    Replies: 3
    Last Post: 03-21-2018, 07:18 PM
  2. Adding a Cell Range to a String Variable
    By RunTime91 in forum Access
    Replies: 3
    Last Post: 01-27-2018, 02:38 PM
  3. Clear Cell Range Based on Text in Another Cell
    By Oxygen Potassium in forum Access
    Replies: 3
    Last Post: 08-20-2017, 08:12 PM
  4. Replies: 1
    Last Post: 07-12-2013, 01:48 PM
  5. Can we post Access cell data to Excel cell properties?
    By Zethro in forum Import/Export Data
    Replies: 1
    Last Post: 12-13-2005, 08:42 AM

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