Author: Oscar Cronquist Article last updated on January 09, 2018

This post shows you how to move a shape with vba code. Select a cell (button name) and the arrow instantly points to the button. I made a simple picture from an old remote I found.

Interactive shapes

VBA code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveSheet.Shapes.Range(Array("Straight Arrow Connector 42"))
    If Not Intersect(Target, Range("F5:F13")) Is Nothing Then
            .Visible = True
            .Left = ActiveCell.Offset(0, 1)
            .Top = ActiveCell.Offset(0, 2)
        .Visible = False
    End If
End With
End Sub
  1. Right click on sheet name
  2. Click on "View Code"
    remote - view code
  3. Paste code to sheet module
    remote - sheet module
  4. Exit VB Editor

Download excel *.xlsm file