Dimitriy
07-31-2009, 12:39 PM
Hey Everybody,
I am having a problem with the following code:
With Sheets("Standard Menu Individual Items")
Set Rng = Range("D8:F17")
End With
With Rng
.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"B21:B22"), CopyToRange:=Range("D25:F43"), Unique:=True
End With
When I wrote the code in a smaller environment outside of my main spreadsheet, it worked fine. But when I added this piece of code to the rest of my code it gives me the following error message:
"Run-time error 1004 - Connot change part of a merged cell"
Any suggestions? I am really stuck...:banghead:
I am having a problem with the following code:
With Sheets("Standard Menu Individual Items")
Set Rng = Range("D8:F17")
End With
With Rng
.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"B21:B22"), CopyToRange:=Range("D25:F43"), Unique:=True
End With
When I wrote the code in a smaller environment outside of my main spreadsheet, it worked fine. But when I added this piece of code to the rest of my code it gives me the following error message:
"Run-time error 1004 - Connot change part of a merged cell"
Any suggestions? I am really stuck...:banghead: