Results 1 to 2 of 2

Thread: Turning a Excel Cell into a button with macro?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    17

    Turning a Excel Cell into a button with macro?

    Hi I wish to turn an Excel cell into a button, but the Google results does not seem very promising. Is it at all possible to create a proper button in a cell.

    Normal or straightforward methods do not seem to work. Can anyone tell me where to start or confirm that it's just not impossible?

  2. #2
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: Turning a Excel Cell into a button with macro?

    In Excel using VBA you use the Worksheet_SelectionChange

    Then, use an If to see if the selected cell is the one you want to use such as:

    VB Code:
    1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    2.     If ActiveCell.Address = "$A$1" Then
    3.         'code here as if it were your Button_Click event.
    4.             MsgBox "Instant button!"
    5.     End If
    6. End Sub

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