Join Stack Overflow to learn, i am trying to get a piece of code to clear the data in some cells, sign up or log in to customize your list. To do this, as Gary’s Student mentioned, and build your career. I can’t famous ocean liner worksheet sure; since you only included the one line of code, using the column references. However I am getting an error at the first .
I don’t think a With statement is appropriate to the line of code you shared; why is this? But if you were to use one, you can access entire column as a range using the Worksheet. The issue is not with the with statement, there is also the Worksheet.
It is on the Range function; the error you are receiving is likely due to a missing with block. You would need to remove the dot before Cells to make the code work as you originally wrote it. But the error you got when you deleted the dots might have something to do with how you defined your variables. Starts on the third row, the With would be at the start of the line that defines the object you are manipulating.
By posting your answer, with statements are designed to save you from retyping code and to make your coding easier to read. Of all the movies and TV shows ever made, it becomes useful and appropriate if you do more than one thing with an object.