View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Macro relative to button position


Private Sub CommandButton1_Click()
With CommandButton1
Cells(.TopLeftCell.Row, .BottomRightCell.Column + 1).Value = "X"
End With
End Sub

Rob

"wesandem " wrote in message
...
Is there a way to make a macro relative to a button position? I want to
have a macro input a set value into a cell that is beside the button.
The sheet I am desiring has hundreds of buttons that all do the same
exact thing - place an "X" into the cell beside the button - I don't
feel like writing hundreds of individual macros, so I am hoping there
is a way to make the action relative to the button, not absolute or
relative to the currently selected cell, which are the only two options
i know of.
Please help - this is driving me nuts! THANKS!


---
Message posted from http://www.ExcelForum.com/