Results 1 to 3 of 3

VBA Error 2110 - Help!

This is a discussion on VBA Error 2110 - Help! within the Excel Questions forums, part of the Question Forums category; I've been working on a userform at my house. All I have done so far is the userform1 page design ...

  1. #1
    New Member
    Join Date
    Dec 2012
    Posts
    2

    Default VBA Error 2110 - Help!

    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!

  2. #2
    MrExcel MVP
    Moderator
    Smitty's Avatar
    Join Date
    May 2003
    Location
    Crested Butte, CO
    Posts
    27,304

    Default Re: VBA Error 2110 - Help!

    Welcome to the Board!

    Can you post the code and indicate which line the error is occurring on?
    Smitty

    Every once in a while, there's a sudden gust of gravity...

    Check out my new book at the Mr. Excel Bookstore!

    Mr. Excel HTML Maker - Post a shot of your sheet

  3. #3
    New Member
    Join Date
    Dec 2012
    Posts
    2

    Default Re: VBA Error 2110 - Help!

    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

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com