Hi,
Below is my code -(Excel 2013)
From the above code I am able to get the record in Msgbox but not able to paste in a excel cells![]()
Please Login or Register to view this content.
Please let me know what I am doing wrong ?
Hi,
Below is my code -(Excel 2013)
From the above code I am able to get the record in Msgbox but not able to paste in a excel cells![]()
Please Login or Register to view this content.
Please let me know what I am doing wrong ?
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.
Ok , please suggest how can I paste the recordset in excel
Do you understand the concept of recordsets and record pointers?
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.
http://www.excelforum.com/showthread...t=#post3470996I am just starting with VBA from yesterday
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
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 .
Sorry but not helpful.
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.
No issues , thanks .
Not the smartest query but this will work in case anyone has the same problem
Any improvements/suggestions are most welcome.![]()
Please Login or Register to view this content.
Thanks,
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks