Tuesday, February 24, 2009

Excel VBA: Selecting A Row Or Column

To select the entire column we can use the EntireColumn property. The following excel VBA macro example demonstrates how to select the column of the active cell.

Sub SelectColumn()
ActiveCell.EntireColumn.Select
End Sub

The next following excel VBA macro example demonstrates how to perform an operation on all cells in the selected row. This following procedure changes all cells font size to 18 in the row that contains the active cell.

Sub ChangeFontSize()
 ActiveCell.EntireRow.Font.Size = 18
End Sub

Related posts:
---
If you like posts in this blog, you can to support me :)

No comments:

Post a Comment