+ Reply to Thread
Results 1 to 3 of 3

Event on select

Hybrid View

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    Slagelse, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    20

    Question Event on select

    Hi all,

    I am trying to make an event happen when I select a cell. It works fine for a single cell.

    I would like the event to happen if I select any cell in a certain column. I have tried the following:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If Target.Address = ("D:D") Then
            Kalender.Show
        End If
    End Sub
    It doesn't work though.

    Any help will be appreciated.

    Thanks,
    -Ronnie.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Event on select

    Try

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If Target.Columns.Count = 1 And Target.Column = 4 Then
            Kalender.Show
        End If
    End Sub

  3. #3
    Registered User
    Join Date
    08-08-2012
    Location
    Slagelse, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Event on select

    Thanks Martin,

    This solved my problem. Thank you very much.

+ 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