Results 1 to 2 of 2

Thread: what cells are selected => print in msgbox

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2005
    Posts
    13

    what cells are selected => print in msgbox

    I have an event on my worksheet: worksheet_SelectionChange.
    now i want to popup a msgbox that displays what is selected.
    for example i select A1:B1
    then the msgbox has to display this string: "A1:B1"

    Code:
    Private Sub worksheet_SelectionChange(ByVal Target As Range)
    
        'msgbox ?????
    
    End Sub

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: what cells are selected => print in msgbox

    Code:
    msgbox selection.address

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

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



Click Here to Expand Forum to Full Width