sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
Good Evening,
I seem to be having a workbook that error's out if I have other, non-vba workbooks open. The workbook initially opens up and hides the workbook itself (a userform shows) as designed. However, when I click a button in the userform, I get "run-time erorr '-2147352565 (8002000b)' Can't move focus ot the control because it is invisible, not enabled, or of a type that does not accept the focus."
I was hoping someone had some insight on this. Here is the code that runs when the button is pressed.
Thanks
I seem to be having a workbook that error's out if I have other, non-vba workbooks open. The workbook initially opens up and hides the workbook itself (a userform shows) as designed. However, when I click a button in the userform, I get "run-time erorr '-2147352565 (8002000b)' Can't move focus ot the control because it is invisible, not enabled, or of a type that does not accept the focus."
I was hoping someone had some insight on this. Here is the code that runs when the button is pressed.
Thanks
Code:
Private Sub CommandButton3_Click()
'On Error GoTo Helper
Dim name As String
name = Sheets("Developer").Range("N4")
TryAgain:
Pass = InputBox("Enter Password", "The Coding Sheets")
If Pass = "" Then Exit Sub
If Pass = CStr(Worksheets("Developer").Range("B23").Value) Then
Sheets("Developer").Visible = True
Sheets("Notes").Visible = True
Sheets("Ports").Visible = True
Sheets("Developer").Select
Application.Visible = True
Else
MsgBox "Password incorrect, Please try again", vbCritical, name
GoTo TryAgain
End If
Unload Me
'Error Clearing Code
Exit Sub
Helper:
resp = MsgBox("We're sorry to see you've encountered an error." & vbCrLf & vbCrLf & "To proceed, we recommend you contact the Developer " & _
"with error codes [1066] and " & "[" & Err.Number & "-" & Err.Description & "]." & vbCrLf & vbCrLf & "To attempt to patch your problem at least " & _
"temporarily, we recommend you click [Yes] to see help directions. Would you like to continue?", vbYesNoCancel, name)
If resp = vbYes Then
Call Error_Handle(sprocname, Err.Number, Err.Description)
ElseIf resp = vbNo Then
Exit Sub
ElseIf resp = vbCancel Then
Exit Sub
End If
End Sub