Code: Select all
Set RSTC = CreateObject("ADODB.Recordset")
RSTC.CursorLocation = adUseClient
RSTC.Fields.Append "ORIG", vbString
RSTC.Fields.Append "COD", vbString
RSTC.Open
With RSTC
For C = 0 To MYDIC.Count - 1
.AddNew
RSTC("COD").Value = MYDIC.Keys()(C)
RSTC("ORIG").Value = MYDIC.Items()(C)
Next C
End With
RSTC.MoveFirst
RSTC.Sort = "ORIG DESC" [b]<<<<< error[/b]
COD is a string valkue, ORIG is a integer value