Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Charting / October 2006

Tip: Looking for answers? Try searching our database.

Macro Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 23 Oct 2006 21:36 GMT
I know very little about VBA coding.  I found an event macro in another
thread on this board to enter a date/time stamp in a cell when a chanage was
made in a range of cells.  The code was written for a range that was a single
column and used .offset(0,1) to determine where the date was entered (see the
macro below).  I am trying to modify this macro for a three demensional range
(a1:h12) and want the date to be stored in the same row as the active cell
but in column I.  I am sure this is a simple change but it is beyond my
knowlege - any help?

The following is the macro I am trying to modify:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
       With Target
           If .Count > 1 Then Exit Sub
           If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
               Application.EnableEvents = False
               If IsEmpty(.Value) Then
                   .Offset(0, 1).ClearContents
               Else
                   With .Offset(0, 1)
                       .NumberFormat = "dd mmm yyyy hh:mm:ss"
                       .Value = Now
                   End With
               End If
               Application.EnableEvents = True
           End If
       End With
   End Sub

Rob
Don Guillett - 23 Oct 2006 22:54 GMT
could it be as simple as
offset(0,8) for col I (eye)

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>I know very little about VBA coding.  I found an event macro in another
> thread on this board to enter a date/time stamp in a cell when a chanage
[quoted text clipped - 30 lines]
>
> Rob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.