I have this code that clears the contents in the first 28 columns in the active row. How can I include columns 95 to 107 (ignoring 29 - 94)
[VBA]ActiveCell.Resize(, 28).ClearContents[/VBA]
I have this code that clears the contents in the first 28 columns in the active row. How can I include columns 95 to 107 (ignoring 29 - 94)
[VBA]ActiveCell.Resize(, 28).ClearContents[/VBA]
Not quite; it will only do this if the active cell is in column A, if the active cell is in any other column, the cells cleared will be the active cells and the 27 cells to the right of it.Originally Posted by av8tordude
It might be safer to have:
[VBA]cells(activecell.row,"A").resize(,28).clearcontents[/VBA]
Perhaps by adding a second line:Originally Posted by av8tordude
[VBA]cells(activecell.row,"A").offset(,94).resize(,13).clearcontents[/VBA]
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.