Sign famous ocean liner worksheet answers or log in to customize your list. And build your career.
Using the column references. Join Stack Overflow to learn; however I am getting an error at the first . I am trying to get a piece of code to clear the data in some cells – why is this?
To do this – you can access entire column as a range using the Worksheet. As Gary’s Student mentioned, there is also the Worksheet.
I can’t be sure, the error you are receiving is likely due to a missing with block. Since you only included the one line of code — you would need to remove the dot before Cells to make the code work as you originally wrote it. I don’t think a With statement is appropriate to the line of code you shared, but the error you got when you deleted the dots might have something to do with how you defined your variables.
But if you were to use one, the With would be at the start of the line that defines the object you are manipulating. The issue is not with the with statement, with statements are designed to save you from retyping code and to make your coding easier to read.