LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Static Now() function

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a static date into a function FIF780 Excel Worksheet Functions 5 February 1st 07 10:39 PM
How to make the Result of a TODAY Function static? kscramm Excel Worksheet Functions 11 March 23rd 06 08:17 AM
Static Row DY New Users to Excel 5 September 9th 05 12:36 AM
using now() as static function MINAL ZUNKE New Users to Excel 3 June 29th 05 05:04 PM
How can I keep top row in Excel static? Kerouac Excel Discussion (Misc queries) 2 June 20th 05 08:20 PM


All times are GMT +1. The time now is 02:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"