Hi,
how can I revise below code when I click a cell date will write and " osman " will write next to date cell. ( like A1 B1 )
Sub Macro1()
ActiveCell.FormulaR1C1 = "=TODAY()"
ActiveCell.FormulaR1C1 = "osman"
Hi,
how can I revise below code when I click a cell date will write and " osman " will write next to date cell. ( like A1 B1 )
Sub Macro1()
ActiveCell.FormulaR1C1 = "=TODAY()"
ActiveCell.FormulaR1C1 = "osman"
OSMAN
aoc,
Sub Macro1() ActiveCell.Formula = "=TODAY()" ActiveCell.Offset(, 1).Formula = "osman" End Sub
The following code will work for a double click event
[vba]Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Selection.Count > 1 Then Exit Sub
If Target.Column = 1 And Target.Row = 2 Then
Target.Value = "=Today()"
Target.Offset(0, 1).Value = "Osman"
Cancel = True
End If
End Sub[/vba]
Download the attached workbook for an example of how it does so.
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link