View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
paul.nielson paul.nielson is offline
external usenet poster
 
Posts: 1
Default Execute a macro when the contents of A1 changes

I’m trying to get a marco embedded in a worksheet to run when A1
changes, I’m using

Private Sub Worksheet_Change(ByVal Target As Range)

To run the code with

If ActiveCell = Cells(2, 1) Or ActiveCell = Cells(1, 2) Then

To test if the current cell is an adjacent cell to A1 has been
selected. This seems to be an inefficient method and not 100% reliable
has anyone a better suggestion



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

-- View and post Excel related usenet messages directly from http://www.ExcelTip.com/forum
-- Hundreds of free MS Excel tips, tricks and solutions at http://www.ExcelTip.com/
------------------------------------------------