1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Error 1004 in excel vba

Discussion in 'Software Development' started by Radheshyam, Nov 13, 2018.

Thread Status:
Not open for further replies.
  1. Radheshyam

    Radheshyam Thread Starter

    Nov 12, 2018
    Sub Clearcells()
    Range("B12", "B4000").Clearcontents
    Range("C12", "C4000").Clearcontents
    Range("E12", "E4000").Clearcontents
    Range("G12", "G4000").Clearcontents
    Range("I12", "I4000").Clearcontents
    Range("N12", "N4000").Clearcontents
    Range("O12", "O4000").Clearcontents
    Range("P12", "P4000").Clearcontents
    Range("Q12", "Q4000").Clearcontents
    Range("R12", "R4000").Clearcontents
    Range("T12", "T4000").Clearcontents
    Range("U12", "U4000").Clearcontents
    Range("V12", "V4000").Clearcontents
    Range("W12", "W4000").Clearcontents
    Range("X12", "X4000").Clearcontents
    Range("Y12", "Y4000").Clearcontents
    Range("Z12", "Z4000").Clearcontents
    Range("AA12", "AA4000").Clearcontents
    Range("AB12", "AB4000").Clearcontents
    Range("T4", "T5").Clearcontents
    Range("U4", "U5").Clearcontents
    Range("V5", "V5").Clearcontents
    End Sub

    I added this in the excel developer for clear the cells but when I clicked on assistive button it clears all the data but when I protected the sheet it doesn't work it shows 1004 error. please help
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1219049

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice