I have a Visual Basic command button on an Excel worksheet. When the command
button is clicked I need the code to make use of the column number of the
active cell. How is this found?
Gary Keramidas - 22 Mar 2006 00:58 GMT
try ActiveCell.Column
this will return 1 for column A

Signature
Gary
>I have a Visual Basic command button on an Excel worksheet. When the command
> button is clicked I need the code to make use of the column number of the
> active cell. How is this found?
Jim Thomlinson - 22 Mar 2006 01:01 GMT
Try something like this
MsgBox ActiveCell.Column
activecell.entirecolumn.select
or whtatever...

Signature
HTH...
Jim Thomlinson
> I have a Visual Basic command button on an Excel worksheet. When the command
> button is clicked I need the code to make use of the column number of the
> active cell. How is this found?