So the reason I create and destroy for every record is that every single record in RS sends an email out. Basically RS is a distinct list of clients that need to receive a performance review email. So I must create a new WB for each with only their data applicable (due to HIPPA compliance). I...
It is the exact same error code on that line. I put that in the original post that it would run just fine for the first 5 or 6 iterations of my RS loop.
So after further review and some error handling, it appears that the issue arises with the first copyfromrecordset method that is after the...
So the variable definitions did not seem to make an impact, im still getting the error, this time on line - wb.Worksheets("MemberRiskReport").Range("A2").CopyFromRecordset rsqry3, after about the 5th or 6th record is run correctly
Yeah Skip I actually left out pretty much all of the code after the copyfromrecordset lines. its probably another 200 lines, but I do not know if looping would work as every paste location is unique.
Either way my copyfromrecordset lines are all where statements (specifically rsqry would always...
Thnaks Andrzejek I will look at that, I actually did not know that. I assumed that would be the case based on my knowledge of C++.... whoops
I will change that and see if it impacts it
Hello,
I am building some code to send emails with attachments to clients, so I am copying recordsets to excel sheets and then sending the excel file to them. Basically every record in the recordset correlates to an attached email.
Essentially I continue to get this error, "Run-time error...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.