Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I saw this code in an earlier posting:
Private Sub Worksheet_Change(ByVal Target As Excel.Range) 'when entering data in a cell in Col B Application.EnableEvents = False On Error GoTo enditall If Target.Cells.Column = 2 Then n = Target.Row If Excel.Range("B" & n).Value < "" Then Excel.Range("A" & n).Value = Now End If End If enditall: Application.EnableEvents = True End Sub I have made adjustments so that it can display the date and time in the column I want. However, I get an error which says "Argument not optional". Please help. Also, would it be possible to adjust it so that it works across multiple worksheets? Thank you in advance. This is sheet event code. Right-click on the sheet tab and "View Code". Copy/paste into that module. Macros must be enabled by the user when opening the workbook for this code to be available. -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inserting a static date into a function | Excel Worksheet Functions | |||
How to make the Result of a TODAY Function static? | Excel Worksheet Functions | |||
Static Row | New Users to Excel | |||
using now() as static function | New Users to Excel | |||
How can I keep top row in Excel static? | Excel Discussion (Misc queries) |