Im trying to write some code to clear the contents and borders of columns A thru g with the exception of the first two rows which I want to remain. I think it is a simple one but I can't figure it out.
Thanks In Advance
Gary
Im trying to write some code to clear the contents and borders of columns A thru g with the exception of the first two rows which I want to remain. I think it is a simple one but I can't figure it out.
Thanks In Advance
Gary
Try this:
[vba]
With Range("A3:G65536")
.ClearContents
.Borders.LineStyle = xlNone
End With
[/vba]
Thanks DRJ, I thought there would have been an easier way using entirecolumn or something like that.
Thanks Again
Yes, but entirecolumn would not allow retaining the status quo in rows 1 and 2 as you wished.
If you have posted the same question at multiple forums, please read this IMPORTANT INFO.
Please use the thread tools to mark your thread Solved
Please review the Knowledge Base
for samples and solutions , or to submit your own!
Ok, I thought maybe an exception for the two rows could be made. Thanks guys problem solved. I would mark this thread as solved but I can't find that tool anymore.
Once the board upgrades are resolved, we will mark it solved for you...the feature is temporarily unavailable.
If you have posted the same question at multiple forums, please read this IMPORTANT INFO.
Please use the thread tools to mark your thread Solved
Please review the Knowledge Base
for samples and solutions , or to submit your own!