Hi all. New on here. Trying to get some basic programming done on an invoice template I'm working on for my job.
Feel pretty stupid but I'm also newer to programming so that will explain my lack of knowledge of the language. Here's my problem..
I have a button to delete an entire row if not needed. I have in column U text that simply says "OK"
I would like to delete the entire selected row when I click the button as long as column U doesn't say "OK".
I can't figure out what the syntax should be in vba.
I have this which obviously doesn't work:
Sub Button8_Click() 'Delete
If Application.CountA(ActiveCell.EntireRow) And Columns("U:U") = "OK" Then 'My problem line!
ActiveCell.Offset(0, 1).EntireRow.Delete
End If
End Sub
Any help would be great. Thanks!
Bookmarks