You can delete test sets from the API using the TestSet Factory Object and the RemoveItem method. Below is an example:
On Error Resume Next
Dim qcServer, qcDomain, qcProject, qcUser, qcPassword
'Define variable values for QC connection
qcServer = ''http://qc:8080/qcbin/''
qcDomain = ''DEFAULT''
qcProject = ''ALM_DEMO''
qcUser = ''alex_alm''
qcPassword = ''''
'Create the TD Connection object
Set tdc = CreateObject(''tdapiole80.tdconnection'')
'Establish the connection and log in to the project
tdc.InitConnectionEx qcServer
tdc.Login qcUser, qcPassword
tdc.Connect qcDomain, qcProject
'If connection is established
If tdc.Connected = True Then
'Get the TestSetFactory object
Set TSFact = tdc.TestSetFactory
'Remove the TestSet by ID
TSFact.RemoveItem(30)
'Report any errors
If Err.Number <> 0 Then
MsgBox Err.Number & '' : '' & Err.Description
End If
'Kill the TestSetFactory object
Set TSFact = Nothing
End If
'Disconnect from the project and logout of QC
tdc.Disconnect
tdc.Logout
'Kill the TDConnection object
Set tdc = Nothing
On Error Goto 0