ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Active Range? (https://www.excelbanter.com/excel-programming/351328-active-range.html)

mturner

Active Range?
 

Is there a way of referring to an active selection of cells in vba, like
you can activecell for an individual cell?


--
mturner
------------------------------------------------------------------------
mturner's Profile: http://www.excelforum.com/member.php...o&userid=30147
View this thread: http://www.excelforum.com/showthread...hreadid=504516


Dave Peterson

Active Range?
 
Use Selection

if selection.cells.count 1 then
'more than one cell selected
....

mturner wrote:

Is there a way of referring to an active selection of cells in vba, like
you can activecell for an individual cell?

--
mturner
------------------------------------------------------------------------
mturner's Profile: http://www.excelforum.com/member.php...o&userid=30147
View this thread: http://www.excelforum.com/showthread...hreadid=504516


--

Dave Peterson

mturner[_2_]

Active Range?
 

Thanks, I'll give it a try.;)


--
mturner
------------------------------------------------------------------------
mturner's Profile: http://www.excelforum.com/member.php...o&userid=30147
View this thread: http://www.excelforum.com/showthread...hreadid=504516



All times are GMT +1. The time now is 02:43 AM.

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