+ Reply to Thread
Results 1 to 4 of 4

Determine if entire row or column is selected

  1. #1
    Registered User
    Join Date
    01-19-2005
    Posts
    27

    Determine if entire row or column is selected

    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.

  2. #2
    Tom Ogilvy
    Guest

    RE: Determine if entire row or column is selected

    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
    >
    >


  3. #3
    JE McGimpsey
    Guest

    Re: Determine if entire row or column is selected

    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.


  4. #4
    Registered User
    Join Date
    01-19-2005
    Posts
    27
    JE McGimpsey,
    Thanks that was perfect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1