I'm having the same issue here. I've found the following code, but am still have issues configuring it correctly...
'Define the object names.
varSerial = 0
'Define the database connection parameter constants.
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adCmdText = &H0001
'Connect to the Excel file.
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='M:\Correct Labels\Inspection Labels\inspectTable.xlsx';Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
'Create a record set of one record which is the current record being printed.
Set rs = CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM [Sheet1$]", objConn, adOpenStatic, adLockOptimistic, adCmdText
rs.Find "id = '" & Field("Sheet1$.id") & "'"
varSerial = rs.Fields("Serial")
'Increase the Serial by one for each printed label
rs.Fields("Serial") = varSerial + 1
I'm getting the following error in the VB script editor:
OnIdenticalCopies (Line 21): Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
For reference I found the code from this forum post: