Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
?B?RXJpY0c=?= wrote in
: This code does not work for me (in 2007) due to the fact that the sheet is protected: Sheet4.Range("AP1:AP" & LastRowNewData).AdvancedFilter _ Action:=xlFilterCopy, _ CopyToRange:=Sheet4.Range("A" & 48), _ Unique:=True If I wrap it in an Unprotect/Protect set, as below, it works fine. Try this before continuing to investigate the mystery of the missing code. Sheet4.Unprotect Sheet4.Range("AP1:AP" & LastRowNewData).AdvancedFilter _ Action:=xlFilterCopy, _ CopyToRange:=Sheet4.Range("A" & 48), _ Unique:=True Sheet4.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowFormattingCells:=True, AllowFormattingColumns:=True, _ AllowFormattingRows:=True, AllowDeletingColumns:=True, AllowDeletingRows _ :=True, AllowSorting:=True, AllowFiltering:=True HTH, Eric "Isis" wrote: I have a sheet that seems to get 'stuck' calling a block of non existent code - it happens after I clear the sheet then click any of a number of cells. It has something to do with protection as it does not happen if I unprotect the sheet - obviously noone is going to be able to pinpoint this from a short description ! How can I find the reference to the the non existent code block in my code - I have done a 'find' within the code but I am not seeing it ? Any other ideas would be most welcome. Thanks . Per and Eric, thanks very much for checking this out for me - I will insert the code to protect and unprotect the sheet and see what happens tomorrow - still don't understand the reference to the nonexistent code but mayber that is unimportant. Regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with "Application.Goto Reference" code line | Excel Programming | |||
Link to non-existent files? | Excel Discussion (Misc queries) | |||
Formula for Reading A Non-Existent Reference | Excel Worksheet Functions | |||
Code Reference Problem | Excel Programming | |||
Need (perhaps non-existent) Formula Help | Excel Programming |