Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Folkes, I am trying to solve this problem. Searching this groups seems
to come up with 2 possible problems. Firstly corrupted sheet (investigated this one and am sure that this is not the problem). Secondly I am not releasing a reference to something before trying to access again. I am copy 2 sheets (containing charts and data with links to another file) from one workbook to a new workbook, unprotecting each sheet and copying /paste special values (to remove the links) and then protecting each sheet in a For/Next loop. I get the automation error when doing the paste special on the second run through. Here is my code.... MyResults(1) = "Tab1" MyResults(2) = "Tab2" Sheets(MyResults).Select Sheets(MyResults(UBound(MyResults))).Activate Sheets(MyResults).Copy For Each s In ActiveWorkbook.Sheets s.Activate ActiveSheet.Unprotect ActiveSheet.Cells.Select Range("AX1").Activate Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= False, Transpose:=False Range("AX1").Select s.Protect Next s Can anybody explain to me where I am going wrong and how to address the problem please. Thanking you all (again) in advance. Donna |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error using SaveAs (object disconnected from clients!) then XL Cra | Excel Programming | |||
help please!!! error "object invoked has disconnected from its cli | Excel Programming | |||
Automation Error: The Object Invoked Has Disconnected from Its Clients (Excel) | Excel Programming | |||
Automation Error: The Object Invoked Has Disconnected from Its Clients | Excel Programming | |||
The object invoked has disconnected from its clinets | Excel Programming |