Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Automation Error

I'm getting an automation error "The object invoked has disconnected from its
clients" Whenever I try to run a piece of code that is supposed to change the
validation on a range of cells;

Here is the code:
Sub ValidatePCPW()
Prot.UnlockDDSheet
With Sheets("New Deal Data").Range("B158:N173").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=$CD$158:$CD$172"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Invalid Selection"
.InputMessage = ""
.ErrorMessage = _
"Please make your selection from the drop down box provided."
.ShowInput = True
.ShowError = True
End With

Any help with solving this problem would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default Automation Error

Hi
I had the same problem some time back but can't remember exactly what I did.
You may be able to solve it by:

1) Activating the sheet beforehand
2) Making sure that the cell is not in a hidden row or column

Hope these help

"Kurt Barr" wrote:

I'm getting an automation error "The object invoked has disconnected from its
clients" Whenever I try to run a piece of code that is supposed to change the
validation on a range of cells;

Here is the code:
Sub ValidatePCPW()
Prot.UnlockDDSheet
With Sheets("New Deal Data").Range("B158:N173").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=$CD$158:$CD$172"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Invalid Selection"
.InputMessage = ""
.ErrorMessage = _
"Please make your selection from the drop down box provided."
.ShowInput = True
.ShowError = True
End With

Any help with solving this problem would be greatly appreciated.

Reply
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
Compile error automation error nikkiws Excel Programming 0 January 17th 06 08:24 AM
compile error automation error [email protected] Excel Programming 0 January 17th 06 08:06 AM
RunTime Error (Automation Error) KD[_3_] Excel Programming 3 January 25th 05 01:56 PM
Automation Error, Unknown Error. Error value - 440 Neo[_2_] Excel Programming 0 May 29th 04 05:26 AM
Unknown where is the problem on the Runtime error - Automation error wellie Excel Programming 1 July 10th 03 08:12 AM


All times are GMT +1. The time now is 07:40 AM.

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

About Us

"It's about Microsoft Excel"