Re: 'object disconnected from client ...'

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi James,

thanks for your reply.

James Snell wrote:

It's probably because of the delete statement being inside the with and
you're deleting part of the object you're working with.

I tried it with the following changes:

Selection.Validation.Delete
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=LFM_Empty"
<snip>

It didn't change anything: Same error message. I guess that the delete
method of a validation object does only delete the validation
conditions, not the object itself.
That's the reason why the sub worked before.

Now I came back from lunch, started the computer again, and ...
.... get the same error message within all other subs which change
validation of a range.

I did some tests and found that the problem is probably related to the
fact that I'm referring to merged cells.

Here's a little sample code:

Application.Goto Reference:=Range("IPLDetail")
MsgBox Range("IPLDetail").Addres ' Shows "$R$33"
MsgBox Selection.Address ' Shows "$R$33:$U$33" (merged cells)
MsgBox Range("IPLDetail").Text ' Shows the content of the merged cell
MsgBox Selection.Text ' Runtime error 94
' Invalid use of Null


So I exchanged every "Selection.Validation" with
"Range("<name>").Validation", and it works - xxcept that sub CheckPT()
which gives me the following error:

Run-time error '-2147417848 (80010108)':
Method 'Add' of object 'Validation' failed.

The code '-2147417848 (80010108)' is identical to the previous error
'object disconnected from client ...'.

I'm still scratching my head over that one.

CU,
Christian
.



Relevant Pages

  • Re: Error Handling
    ... I'm picturing a utility class being invoked by the GUI to validate the date since this kind of validation is going to be very routine. ... the utility method is going to format an error message that tells the user what is wrong but then what? ... Be aware that if the GUI is a web application GUI, that the odds are pretty good that much of the validation will be handled by a framework. ... the scenario you posit is indeed so routine that built-in mechanisms in many web frameworks will handle this without any Java coding on your part being required at all...you just have to designate in web pages which input elements need this kind of date format conversion. ...
    (comp.lang.java.programmer)
  • Re: Undocumented error codes and Validation Rulw problems
    ... When I entered a value in the subform ... I immediately received the error message I had typed in for the Validation ... > into any of those two text boxes, ...
    (microsoft.public.access.formscoding)
  • Re: Error Notification for inbound documents wanted
    ... the error message logged will not be ... It does the validation for mandatory checks, field length checks, field type ... We used the schema without validation for inbound document defn. ... > document will be shifted into the Suspend Queue. ...
    (microsoft.public.biztalk.general)
  • Design of date validation method
    ... I'd like the form validation to return a clear and specific error message ... My current design, recognizing that the date might be find or might be ... let that be the way the calling program knows that the date was ...
    (comp.lang.java.programmer)
  • Re: Year comparison
    ... thing about date handling in Fox. ... it's assuming a data type of date and operating on Year ... just the line that you provided results in the same error message ... but you've altered the validation considerably. ...
    (microsoft.public.fox.programmer.exchange)