This is right out of the VBA help: ( I added the sendCommand)
Public Sub jbDetachXrefs()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Are you sure you want to Detach All Xrefs ?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "Detach Xrefs" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
MyString = "Yes" ' Perform some action.
ThisDrawing.SendCommand ("_.-xref" & vbCr & "_detach" & vbCr & "*" & vbCr)
Else ' User chose No.
MyString = "No" ' Perform some action.
End If
End Sub
I'm just keeping all up to date as I find adequate substitutions!
jb