Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
Dim strUser As String
Select Case UCase(CommandName)
Case Is = "BEDIT"
strUser = UCase(Environ("USERNAME"))
Select Case strUser
Case "UA02038"
Case "UA03347"
Case Else
MsgBox "B-Edit has been removed," & vbCrLf & _
"Contact Ron Roach or David Hall", vbCritical
SendKeys "{ESC}"
End Select
Case Is = "-BEDIT"
strUser = UCase(Environ("USERNAME"))
Select Case strUser
Case "UA02038"
Case "UA03347"
Case Else
MsgBox "B-Edit has been removed," & vbCrLf & _
"Contact Ron Roach or David Hall", vbCritical
' SendKeys "{ESC}"
ThisDrawing.SendCommand "bclose" & vbCr
End Select
Case Is = "COMMANDLINE"
Set AutoCAD = ThisDrawing.Application
End Select
End Sub