Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    5

    Unanswered: run macro upon selection

    this is a start.

    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    If Target.Address = "$A$1" Then <---i need this to be a range a1:g10
    MsgBox "Cell " & Target.Address & " has changed."

    End If
    End Sub

  2. #2
    Join Date
    Nov 2012
    Posts
    5
    i have a range of cells
    if any cell within this range is selected i would like for a macro to be run automatically. i gto this part torun with this code

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Target.Column >= 3 And Target.Column <= 25 And (Target.Row >= 2 And Target.Row <= 19) Then
    MsgBox "Hi"
    End If

    End Sub
    instead of the message box i need it to do the next step.




    when cell is selected a box would come up with options of selecting 1-6.
    value of selected cell would copy to cell assign to option.

    1=a20
    2=a21
    3=a22
    4=a23
    5=a24
    6=a25

    thanks

Posting Permissions

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