to run a command in a cell

  • Thread starter Thread starter Steven Van Laethem
  • Start date Start date
S

Steven Van Laethem

That is working ! You are great.

Any chance that i can introduce that in a single cell

So i click A47 and that the date&time comes automatically
 
If you mean to insert the date/time to any cell without using the command
button use the worksheet selection change event as below. Right click the
sheet tab>view code and paste the code..

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count = 1 Then Target = Now
End Sub


If this post helps click Yes
 
also working !

can i make that only to f.e. colom G and not all the sheet ?

sorry for all this questions
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count = 1 Then
Range("G" & Target.Row) = Now
End If
End Sub

If this post helps click Yes
 
Hello,

working but i only want the time when clicking in a cell of column G

when i click a cell in f.e. column Z now the time is alse getting up in
column G
 
i want to insert the date/tie just in the cells from column G
all other colums are having other data

So if i click G1 or G2 or G... date and time must uppear ( but only when i
click those cells)
 
Back
Top