• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Clear contents of certain columns.

Belleke

Well-Known Member
I have
Code:
Set Rng = [ANRs]
Set fnd = Rng.Find(What:=T_26.Value, LookIn:=xlValues, LookAt:=xlWhole)
If Not fnd Is Nothing Then smessage = "Afrekenen, ben je  zeker" + "?"
If MsgBox(smessage, vbQuestion + vbYesNo, "Bevestig Afrekenen") = vbNo Then GoTo oops
ws.Rows(fnd.Row).ClearContents
I want to change ws.Rows(fnd.Row).ClearContents so it only clears cells C to W
Thanks to have a look at it
 
Hi Belleke,

try changing the line

Code:
ws.Rows(fnd.Row).ClearContents

with

Code:
ws.Range("C" & fnd.Row & ":W" & fnd.Row).ClearContents
 
Back
Top