Hello Lewis Shaw,
I believe that you have faced the same issue that mentioned in the below picture.
If yes, Please check your code for the temporary cursor that has been used in the spread1_Line check event & user1 field check event.
Below code is the sample instance for you.
Private Sub Spread1_LineChk (action As Integer, maintflg As Integer, retval As Integer)
Dim SqlStr As String
Dim Csr_Temp As Integer
SqlStr = " Select * from Account Where Acct = " & SParm(Trim(GetObjectValue("cacct")))
serr1 = SqlFetch1(Csr_Temp, SqlStr, bAccount, LenB(bAccount))
End Sub
Dim Csr_Temp as Integer is the temporary cursor which is declared inside of the Spread1_Linechk event. Instead you can use the Global cursors like C1, C2 and C3 that already predefined cursors in VBTOOLS_VBA (refer under modules in Customization Mode).
If you used the temporary cursors in your VBA code, you have to set free that cursor using SqlFree API. If you haven’t do the set free of temporary cursor, the cursor still remains open state since the Standard SL only allows 50 open cursors.
Call SqlFree (Csr_Temp)
Since you are doing the copy & paste of 50 or more than 50 records from the excel sheet into the Grid, this raised the error situation.
Private Sub Spread1_LineChk (action As Integer, maintflg As Integer, retval As Integer)
Dim SqlStr As String
Dim Csr_Temp As Integer
SqlStr = " Select * from Account Where Acct = " & SParm (Trim(GetObjectValue("cacct")))
serr1 = SqlFetch1 (Csr_Temp, SqlStr, bAccount, LenB(bAccount))
Call SqlFree (Csr_Temp)
End Sub
Hope this explains.