Automation Error when updating to windows 7

Taffer

New Member
Joined
Jan 10, 2010
Messages
18
Thanks for taking the time to read this and possibly helping. When I recently updated to windows 7 & Office 2013, I ocassionally keep getting an error "Automation error the object invoked has disconnected from its client" when trying to use a combo box drop down menu on a user form; which causes excel to lock up. I never got this error before when using this file in windows XP with office 2007.

Here is where it says the error is:
Code:
Private Sub CommandButtonNewPerson_Click()
    frmEnterPersonData.Show
End Sub

I also have the combo box formated for a drop down of selectable dates as seen below:
Code:
Private Sub ComboBox4_Change()
    Me.ComboBox4.Value = Format(Me.ComboBox4.Value, "mm/dd")
End Sub
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I think I might have found the issue. Every time I search a column for a matchingvariable to populate a form; if the search comes up as not populated I filterout with a message prompting that the number isn’t occupied currently. The problem occurs with the next time I tryand use the userform I get the above error when clicking on the comboboxes. Is there anything that might becausing an error in these search parameters?<o:p></o:p>

Code:
Private Sub SearchRoombtn_Click()  'Room Search
    Dim NumFound As Range, tbl As Range
    Dim Val
    
    'Set up message texts
    Const msg1 As String = "Please enter a room number to search."
    Const msg2 As String = "This isn't a proper room number."
    Const msg3 As String = "There isn't a patient associated with that room number at this time."
    
    'Set variables so things are easier to refer to
    Set tbl = Sheets("HiddenData").Range("A2:A378") 'Only need to look in col A
    Val = RoomNumberAddPtcbx.Value
    
    If Val = "" Or Null Then
        'If no number send box asking for number
        MsgBox msg1
    Else
        'See if we can find the input value in the table col 1
        Set NumFound = tbl.Find(What:=Val, LookIn:=xlValues, _
            Lookat:=xlWhole, SearchFormat:=False)
            
        If NumFound Is Nothing Then
            'Input value not found
            ' If no room
            MsgBox msg2
        Else
            'Input was found
            With NumFound
                If .Offset(, 1).Value = "" Then
                    'No name beside found input
                    'If no patient
                    MsgBox msg3
                Else
                    'Use the input (already found) to retrieve info from beside it
                    TextBox4.Text = .Offset(, 1).Value
                    TextBox1.Text = .Offset(, 2).Value
                    TextBox2.Text = .Offset(, 8).Value
                    ComboBox4.Value = .Offset(, 3).Value
                    ComboBox3.Value = .Offset(, 4).Value
                    ComboBox1.Value = .Offset(, 7).Value
                    ComboBox5.Value = .Offset(, 9).Value
                    ComboBox2.Value = .Offset(, 10).Value
                    CheckBox1.Value = .Offset(, 16).Value
                    DTobtn.Value = .Offset(, 22).Value
                    RDobtn.Value = .Offset(, 23).Value
                End If
            End With
        End If
    End If
End Sub
 
Upvote 0
I ended up unloading the form to avoid error. No t a great solution, but empty values from previous search seemed to cause error.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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