(You will need to set a reference if the compiler complains about that declaration.)Īside from that, I still don't understand why you're getting an "Invalid procedure call or argument" error. Also, change the declaration for rs to: Dim rs As DAO.Recordset I don't see how this contributes to your error, but I would discard the CreateObject("ADODB.Recordset") line anyway. However, since rs was declared as an object, VBA doesn't care that you first assigned an ADO recordset to it before you re-assign a DAO recordset to it. Set rs = CurrentDb.OpenRecordset("qryOutput")ĬurrentDb.OpenRecordset returns a DAO recordset rather than an ADO recordset. I don't understand why you're getting an error at TextFile.WriteLine. Changing the folder to one which exists, and where I have full permission, allows the code to run without error. So your code gives me error #76, "Path not found", on the CreateTextFile line. Can anyone advise on a solution to the issue. An example of the line which is failing is below : vDataBounds MidB (biData, nPosBegin, nPosEnd-nPosBegin) It would look like the MidB function has somehow been removed. I don't have that folder, C:\Users\Documents, on my system. Invalid procedure call or argument: MidB If the Windows Update is removed then it functions as expected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |