dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,375
- Office Version
- 365
- 2016
- Platform
- Windows
I have the following code:
This deletes everything in the selected row in a table but I don't want it to delete formulas, can someone help me with changing this code please?
Code:
Sub DeleteCostingLine()
Dim ws As Worksheet
Dim tbl As ListObject
Set ws = ActiveSheet
Set tbl = ws.ListObjects("tblCosting")
tbl.ListRows(tbl.ListRows.Count).Delete
Worksheets("Costing_tool").Range("AB5").Value = "1"
End Sub
This deletes everything in the selected row in a table but I don't want it to delete formulas, can someone help me with changing this code please?