ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   selecting the currently active column (https://www.excelbanter.com/excel-programming/362400-selecting-currently-active-column.html)

armagan

selecting the currently active column
 

does anyone know how to do this in VBA?

when you have selected a cell, I want to select the whole column
(without manually specifying which one) of the currently active cell.

any help appreciated


--
armagan
------------------------------------------------------------------------
armagan's Profile: http://www.excelforum.com/member.php...o&userid=34237
View this thread: http://www.excelforum.com/showthread...hreadid=545437


Ardus Petus

selecting the currently active column
 
Activecell.EntireColumn.Select

HTH
--
AP

"armagan" a écrit
dans le message de news:
...

does anyone know how to do this in VBA?

when you have selected a cell, I want to select the whole column
(without manually specifying which one) of the currently active cell.

any help appreciated


--
armagan
------------------------------------------------------------------------
armagan's Profile:
http://www.excelforum.com/member.php...o&userid=34237
View this thread: http://www.excelforum.com/showthread...hreadid=545437




colofnature[_22_]

selecting the currently active column
 

To select the entire column whenever the user selects a cell, put this
in the worksheets code (i.e. right-click on the sheet's tab in XL and
select View Code)

private sub worksheet_selectionchange(byval target as excel.range)
activecell.entirecolumn.select
end sub


Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=545437


armagan[_2_]

selecting the currently active column
 

cheers mate


--
armagan
------------------------------------------------------------------------
armagan's Profile: http://www.excelforum.com/member.php...o&userid=34237
View this thread: http://www.excelforum.com/showthread...hreadid=545437



All times are GMT +1. The time now is 06:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com