VBA Error 2110 - Help!

aestasreif

New Member
Joined
Dec 17, 2012
Messages
2
I've been working on a userform at my house. All I have done so far is the userform1 page design and a button on the excel spreadsheet itself to run the macro.

On my laptop and my desktop at home, they work just fine.
But on my work computer(s), they bring up the Error 2110. I'm not sure how to fix it, please help me!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the Board!

Can you post the code and indicate which line the error is occurring on?
 
Upvote 0
Sub GirlsNight()
UserForm1.Show

End Sub

This is where the yellow error shows up (above).

Before I say to "Debug" on it, it gives me this message:
"Run-Time error '2110': Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."

I've enabled all the macros.

The code (which is a work in progress) is below:
Private Sub CommandButton1_Click()
' Submit Button on Coming Page
ActiveWorkbook.Worksheets("Sheet1").Activate
Range("A1").Select
Do Until IsEmpty(ActiveCell) = True
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop
ActiveCell.Value = TextBox1.Value
If OptionButton1 = True Then
ActiveCell.Offset(0, 1).Value = "Yes"
ElseIf OptionButton2 = True Then
ActiveCell.Offset(0, 1).Value = "Maybe"
ElseIf OptionButton3 = True Then
ActiveCell.Offset(0, 1).Value = "Nope"
End If
Call UserForm_Initialize

End Sub
Private Sub CommandButton2_Click()
' Cancel CommandButton on UserForm1
Unload Me
End Sub
Private Sub UserForm_Initialize()
TextBox1.Value = ""
TextBox1.SetFocus

End Sub
 
Upvote 0

Forum statistics

Threads
1,213,515
Messages
6,114,080
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top