+ Reply to Thread
Results 1 to 11 of 11

Not able to paste recordset in excel spreadsheet

  1. #1
    Registered User
    Join Date
    11-11-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    8

    Not able to paste recordset in excel spreadsheet

    Hi,

    Below is my code -(Excel 2013)

    Please Login or Register  to view this content.
    From the above code I am able to get the record in Msgbox but not able to paste in a excel cells
    Please let me know what I am doing wrong ?

  2. #2
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: Not able to paste recordset in excel spreadsheet

    Probably because after using GetRows, you are at the end of the recordset and there's nothing more to get.

    Comment only, Not tested.

    Also, perhaps you need to check your logic. If the connection is not opened, you display a message box but allow the code to continue as if it was.

  3. #3
    Registered User
    Join Date
    11-11-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Not able to paste recordset in excel spreadsheet

    Ok , please suggest how can I paste the recordset in excel

  4. #4
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: Not able to paste recordset in excel spreadsheet

    Do you understand the concept of recordsets and record pointers?

  5. #5
    Registered User
    Join Date
    11-11-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Not able to paste recordset in excel spreadsheet

    No I dont ,in fact I am just starting with VBA from yesterday.
    I have googled and seemed it work like the result set can be pasted via CopyFromRecordset command.

    If you point to anything useful that will be great.

  6. #6
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: Not able to paste recordset in excel spreadsheet

    I am just starting with VBA from yesterday
    http://www.excelforum.com/showthread...t=#post3470996

    I would suggest that, instead of blindly copying something you do not understand, you would learn more by studying the Properties, Methods and Events available for a recordset.

    Basic introduction to recordsets: https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
    Recordset Properties/Methods: https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx

  7. #7
    Registered User
    Join Date
    11-11-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Not able to paste recordset in excel spreadsheet

    This is urgent for me so I have posted and in all these threads back and forth if I could have get the specific answer that would have been a great help.
    I would definitely study about it more but now I need a quick solution to this .
    So please if anyone else could guide me I will really appreciate that.
    And all of you thanks for taking your time out .

  8. #8
    Registered User
    Join Date
    11-11-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Not able to paste recordset in excel spreadsheet

    Sorry but not helpful.

  9. #9
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: Not able to paste recordset in excel spreadsheet

    OK, sorry if you decided those links were not helpful. They contain all the information you need, particularly with regards to moving the record pointer.

    You're not asking for 'guidance', you've got that, and I know I could simply say what to do, but that assertion that you're "starting with VBA since yesterday" wasn't true so I'm out of this.

  10. #10
    Registered User
    Join Date
    11-11-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Not able to paste recordset in excel spreadsheet

    No issues , thanks .

  11. #11
    Registered User
    Join Date
    11-11-2013
    Location
    pune
    MS-Off Ver
    Excel 2003
    Posts
    8

    Red face Re: Not able to paste recordset in excel spreadsheet

    Not the smartest query but this will work in case anyone has the same problem
    Please Login or Register  to view this content.
    Any improvements/suggestions are most welcome.

    Thanks,

+ 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. Open another recordset within current recordset vba
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2015, 04:32 AM
  2. Paste recordset on next empty row inside a table
    By baijixu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2014, 03:13 PM
  3. Recordset cross referencing spreadsheet data not updating missing values
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-20-2013, 08:36 AM
  4. Automated find and paste URL in Excel Spreadsheet
    By chattemer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2013, 03:29 PM
  5. [SOLVED] Excel won't let me cut and paste a jpeg into the spreadsheet.
    By RickS in forum Excel General
    Replies: 1
    Last Post: 03-09-2006, 02:22 PM
  6. [SOLVED] Recordset's RowID as part of Recordset
    By Trip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2005, 06:55 PM
  7. Replies: 1
    Last Post: 09-20-2005, 07:05 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