Hello,
I'm using this code to clear content while leaving formulas. After i click the button to clear, I get the #N/A in those cells i cleared. Is there a way to handle this. Thanks a lot.
here is my code:
I'm using this code to clear content while leaving formulas. After i click the button to clear, I get the #N/A in those cells i cleared. Is there a way to handle this. Thanks a lot.
here is my code:
Code:
Sub NextInvoice()
On Error Resume Next
Dim rConstants As Range
Range("H5").Value = Range("H5").Value + 1
Set rConstants = Sheet1.Range("C5:C12").SpecialCells(xlCellTypeConstants)
Set rConstants = Sheet1.Range("B17:J17").SpecialCells(xlCellTypeConstants)
Set rConstants = Sheet1.Range("A20:J27").SpecialCells(xlCellTypeConstants)
rConstants.ClearContents
End Sub