LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 'object disconnected from client ...'

Hello,

I'm getting the "Object disconnected from client..' error message in my
VBA project (Excel 2003 on Windows XP professional, all latest patches
installed).

First, here's an excerpt of the code:

Sub CheckPT()
Application.Goto Reference:="IFailureModeM"
' This is on Worksheets("Questionnaire")

If Range("IPackageType").Value = _
Worksheets("Supporting Data").Range("LPT_BGA").Value Then

' Omitted, because this section is not executed

Else ' occurs when "LPT_BGA" is empty

With Selection.Validation
.Delete
' ***The error occurs in the next statement***
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=LFM_Empty"
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = False
.ShowError = True
End With

End If
End Sub

This sub is called from several other subs without any problem. The
problem occurs, when I open a custom dialog box (userform) with a
checkbox, OK and Cancel button. After clicking OK, the above sub is
called. Due to other actions, the if statement will always perform the
else clause on this occasion. And here the error occurs, but funny
enough it occurs *after* the .Delete statement. The .Delete statement is
executed correctly.

I have checked everything I could find regarding that error message, but
cannot get behind the root cause. It does not seem to be connected to
unqualified property call (At least I cannot make it work with a
qualified call - Or I do not understand the qualified/unqualified issue)

If somebody is interested, below is the code of the sub which opens the
dialog box.

Can anybody help me with that problem?

TIA,
Christian

Public Sub ClearQuestionnaire()

BtnNewDlg.Show

Application.EnableEvents = False
' Dissable change events, because sheet will be changed by
' following subs

' The following actions all take place on
' Worksheets("Questionnaire")
For Each c In Range("HAllData").Cells ' Go through all cells
c.MergeArea.ClearContents ' and delete content
Next c ' in "HAllData"

CheckQuestionnaire
' This sub calles 3 other subs prior to CheckPT() which perform
' actions on Worksheets("Questionnaire").
' Some of these are similar to the one in the failing CheckPT(),
' but they work fine.

End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
object disconnected from client error message Ken Warthen[_2_] Excel Programming 4 January 1st 08 01:18 AM
The object invoked as disconnected from its clients. - To many she dan Excel Programming 1 October 30th 07 08:04 AM
object invoked is disconnected from its clients Ken Excel Programming 4 June 27th 07 07:55 PM
Object invoked disconnected from its clients. Spreadsheet Solutions Excel Programming 1 February 7th 06 10:03 AM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"