Results 1 to 2 of 2

Start a macro by clicking in a cell

This is a discussion on Start a macro by clicking in a cell within the Excel Questions forums, part of the Question Forums category; Im trying to not use a button here, can a macro be activated by just clicking in a cell? or ...

  1. #1
    Board Regular
    Join Date
    Jun 2002
    Location
    Minneapolis
    Posts
    71

    Default

    Im trying to not use a button here, can a macro be activated by just clicking in a cell? or on Hypertext?

  2. #2
    MrExcel MVP lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690

    Default

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address <> "$A$1" Then Exit Sub
    yourMacro
    End Sub
    This will run yourMacro when $A$1 is selected

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com