Is there a way I can determine if an entire row or column is selected?
So if I select Column A, I can get my macro to recognize that I have done so and do a certain function.
Is there a way I can determine if an entire row or column is selected?
So if I select Column A, I can get my macro to recognize that I have done so and do a certain function.
If selection.Address(0,0) = "A:A" then
--
Regards,
Tom Ogilvy
"MC82" wrote:
>
> Is there a way I can determine if an entire row or column is selected?
>
> So if I select Column A, I can get my macro to recognize that I have
> done so and do a certain function.
>
>
> --
> MC82
> ------------------------------------------------------------------------
> MC82's Profile: http://www.excelforum.com/member.php...o&userid=18682
> View this thread: http://www.excelforum.com/showthread...hreadid=537264
>
>
One way:
Dim bEntireColumn As Boolean
Dim bEntireRow As Boolean
With Selection
bEntireColumn = .Address = .EntireColumn.Address
bEntireRow = .Address = .EntireRow.Address
End With
If bEntireColumn Then MsgBox "Entire column(s) selected"
If bEntireRow Then MsgBox "Entire row(s) selected"
In article <MC82.26zfrc_1146241203.6789@excelforum-nospam.com>,
MC82 <MC82.26zfrc_1146241203.6789@excelforum-nospam.com> wrote:
> Is there a way I can determine if an entire row or column is selected?
>
> So if I select Column A, I can get my macro to recognize that I have
> done so and do a certain function.
JE McGimpsey,
Thanks that was perfect.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks