I am working on an excel VBA program that I am trying to use clickable cells instead of command buttons. Is it possible and if so how do I make it so that if I make a column clickable the assigned macro will work only in the same row as the cell that was clicked. For example if K5 is clicked, it will post the current time in O5 and the words "IN PROGRESS" in M5. I will need to do this in about 300 rows and I am hoping there is an efficient way to do this. Below is the code I have so far for making a column clickable cells and one of the macros I was testing.
Code:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("D5:D300")) Is Nothing Then
Call INPROGRESS1
End If
End If
End Sub
[\code]
The macro [code]
Sub INPROGRESS1()
'
' INPROGRESS1 Macro
'
'
Range("M5").Select
ActiveCell.FormulaR1C1 = "IN PROGRESS"
Range("M6").Select
Sheet1.Cells(5, 15).Value = Format$(Now, "hh:nn:ss")
End Sub
[\code]
Thank you for your time and assistance. I truly appreciate it.
I don't know if its important, but I do want to say I have been doing this with command buttons and someone suggested using clickable cells to be more efficient so that I don't have to make over 1200 command buttons. Thanks again