Author Topic: Odcl_MessageBox - VBA alternate  (Read 6431 times)

0 Members and 1 Guest are viewing this topic.

jbuzbee

  • Swamp Rat
  • Posts: 851
Odcl_MessageBox - VBA alternate
« on: June 28, 2006, 11:11:05 AM »
This is right out of the VBA help: ( I added the sendCommand)

Code: [Select]
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
James Buzbee
Windows 8