.clear deletes format of all column

Nov 2, 2011 at 10:11 AM

If i delete values using .clear it clears all format of the column.

Here is my sample code for formatting cells:

            lHoja.Cells("A:A").Style.Numberformat.Format = "0"
            lHoja.Cells("B:B").Style.Numberformat.Format = "@"
            lHoja.Cells("C:D").Style.Numberformat.Format = "dd/MM/yyyy"
            lHoja.Cells("E:F").Style.Numberformat.Format = "@"
            lHoja.Cells("G:J").Style.Numberformat.Format = "[h]:mm"
            lHoja.Cells("K:K").Style.Numberformat.Format = "0.0000" '"0,0000"

Here is my sample code for deleting values:

lHoja.Cells("a2:k" & lFila).Clear()

Coordinator
Nov 4, 2011 at 2:13 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.