Results 1 to 3 of 3

Thread: want to start a macro when click on a cell

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Location
    france
    Posts
    71

    Resolved want to start a macro when click on a cell

    I would like to start a macro every time users click a certain cell, but i don't know how to do it

    thanks
    Last edited by writelearner; Sep 22nd, 2004 at 09:54 AM.

  2. #2
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    Re: want to start a macro when click on a cell

    Originally posted by writelearner
    I would like to start a macro every time users click a certain cell, but i don't know how to do it

    thanks
    replace the message box call with a call to your macro in the code below to run it when cell A1 is clicked

    VB Code:
    1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    2.   If Target.Cells.Row = 1 Then
    3.     If Target.Cells.Column = 1 Then
    4.         MsgBox "Hi"
    5.     End If
    6.   End If
    7. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Location
    france
    Posts
    71

    solved

    thanks a lot

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