Hello valgo54,
This change to your macro will clear the cells in column "A". However, it will not change the cell color. Rows 1 through 5 will remain the same.
Sub Pulizia_righe()
' Questa pulisce i campi correttamente senza l'effetto una riga grigia e una no ( 26/07/2013)
Dim max_rows, rows_true, No_Of_Files, r, r1, Num_righe_testata As Integer
Dim File_Path, fin_nome_file, iniz_nome_file, GivenLOcation As String
Dim pos_punto As Byte
Dim Rng As Range
Dim RngEnd As Range
' File_Path = Worksheets("Foglio1").Cells(2, 1)
r = 6
Set Rng = Sheets("Foglio1").Cells(r, "A")
Set RngEnd = Sheets("Foglio1").Cells(Rows.Count, "A").End(xlUp)
Set Rng = IIf(RngEnd.Row > Rng.Row, Sheets("Foglio1").Range(Rng, RngEnd), Rng)
Rng.ClearContents
Rng.Cells(1, 1).Select
MsgBox "Pulizia completata.", vbInformation
End Sub
Bookmarks