Results 1 to 2 of 2

Error:The object invoked has disconnected from client.

Threaded View

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    America
    MS-Off Ver
    Excel 2007
    Posts
    5

    Error:The object invoked has disconnected from client.

    Hi,
    I have 2 forms (form1 and form2). Form 2 have 2 box.
    Form1 will invoke form2 on a button click.
    Form2 will collect data from the user, on clicking on "enter button" in the textbox2 in form2,and after that i need to unload form2.
    But when I tried,
    1.form2 is invoked
    2.Details have been obtained
    3.But while unloading
    I got "The object invoked has been disconnected from client"

    form1:


    Private Sub CommandButton1_Click()
    
    lr = Sheets(housenm).Range("A" & Rows.Count).End(xlUp).Row
    
    For i = 1 To lr
        If Sheets(housenm).Range("A" & i).Value = Lend.Lendnm.Value Then
            Sheets(housenm).Range("B" & i).Value = Sheets(housenm).Range("B" & i).Value + Lend.Lendamt.Value
            updst = "Updated"
        End If
    Next i
    
    If Not updst = "Updated" Then
        Sheets(housenm).Range("A" & lr + 1).Value = Lend.Lendnm.Value
        Sheets(housenm).Range("B" & lr + 1).Value = Lend.Lendamt.Value
    End If
    Fromdet.Tag = Lend.Lendnm.Value
    Intd = "Lend"
    Intamt = Lend.Lendamt.Value
    Unload Lend
    Load Fromdet
    Fromdet.Show
    
    End Sub

    form2:

    Private Sub Fromdetamt_AfterUpdate()
    
    lr = Sheets(housenm).Range("D" & Rows.Count).End(xlUp).Row
    
    If Fromdet.fromdetfrm = "Locker" Then
        Sheets("Lock").Range("D" & lr).Value = Date
        Sheets("Lock").Range("E" & lr).Value = Me.Tag
        Sheets("Lock").Range("F" & lr).Value = Fromdet.Fromdetamt
    ElseIf Fromdet.fromdetfrm = "SBI" Then
        Sheets("SBI").Range("D" & lr).Value = Date
        Sheets("SBI").Range("E" & lr).Value = Me.Tag
        Sheets("SBI").Range("F" & lr).Value = Fromdet.Fromdetamt
    End If
    
    Intamt = Intamt - Fromdet.Fromdetamt
    
    If Intamt < 1 Then
        Unload Fromdet
    End If
    End Sub

    I am getting error in the "Fromdet.Show" in the form1.
    Could anyone Please help.

    Thanks,
    navin.
    Last edited by Cutter; 08-28-2012 at 01:08 PM. Reason: Replaced quote tags with code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1