You can't set the focus on a string, which is what is returned by InputBox. Try
this version:
Dim strresponse As String, ans As Integer
If Range("Q1").Value <> "D" Then
Do
strresponse = InputBox("Enter the code of the Division.", "CBRO Accts ")
If Len(strresponse) = 0 Then
ans = MsgBox("Code is compulsory. Do you want to continue?", vbYesNo, "CBRO
Accts")
If ans = vbNo Then
ActiveWorkbook.Close SaveChanges:=False
End If
End If
Loop Until (strresponse <> "")
' ThisWorkbook.sea = strresponse
End If
I couldn't figure out what the line "ThisWorkbook.sea = strresponse" was, but
it looks like maybe you are storing the user's response somewhere.