Results 1 to 10 of 10

cleaner code

Threaded View

  1. #5
    Registered User
    Join Date
    11-12-2012
    Location
    Arizona, US
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: cleaner code

    I feel kinda embarrassed to ask, but I been trying for a while to add the time stamp on the A column for every print with no luck, how can it be done ? I had put =now() on A3 cell and change Range("A3:D3") but it copies the now() so the time is the same for every row
    Option Explicit
    
    Public tRun As Date
    
    Sub Macro1()
        Static iRow   As Long
        
        If tRun = 0 Then iRow = 5
    
        With Range("B3:D3")
            .Copy .Offset(iRow - 1)
        End With
        
    
            iRow = iRow + 1
        tRun = Now() + #12:00:10 AM#
        Application.OnTime Earliesttime:=tRun, _
                           Procedure:="Macro1", _
                           Schedule:=True
    End Sub

    Clipboard01.jpg
    Last edited by scancool; 11-13-2012 at 07:25 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1