PDA

View Full Version : Error



siCe
09-25-2008, 12:46 PM
When I renew the sheets by using the button, the existing sheets should be cleared. But it don't work. Could somebody help me? Thanks.

david000
09-25-2008, 02:11 PM
You need to convert c to a string.



If WksExists(c.Value) Then
Sheets(CStr(c)).Cells.Clear
rng.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Weekoverzicht").Range("Z1:Z2"), _
CopyToRange:=Sheets(CStr(c)).Range("A1"), _
Unique:=False