perola.rike
Board Regular
- Joined
- Nov 10, 2011
- Messages
- 151
I'm simply trying to copy a named area from one sheet to another. But, Sheets("profil_diy").Range("diy_profil_area") is an area with some hidden rows. I want the code below to copy only the visible cells, which it doesn't...It copy also the hidden rows.
Sheets("profil_manuell").Range("profil_manuell_area") is a named cell, B2 on the "profil_manuell" sheet.
How to modify code to onlye copy visible cells?
I've searched a lot of forums, modifying the code, but with no luck.
Code:
Sheets("profil_diy").Range("diy_profil_area").Copy
With Sheets("profil_manuell").Range("profil_manuell_area")
.PasteSpecial (xlPasteAllUsingSourceTheme)
.PasteSpecial (xlPasteValuesAndNumberFormats)
.PasteSpecial (xlPasteColumnWidths)
End With
Sheets("profil_manuell").Range("profil_manuell_area") is a named cell, B2 on the "profil_manuell" sheet.
How to modify code to onlye copy visible cells?
I've searched a lot of forums, modifying the code, but with no luck.
Code:
Sheets("profil_diy").Range("diy_profil_area").Copy
With Sheets("profil_manuell").Range("profil_manuell_area")
.PasteSpecial (xlPasteAllUsingSourceTheme)
.PasteSpecial (xlPasteValuesAndNumberFormats)
.PasteSpecial (xlPasteColumnWidths)
End With