+ Reply to Thread
Results 1 to 5 of 5

Add Today's Date And User Name

  1. #1
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Karachi, Sindh, Pakistan
    MS-Off Ver
    Excel 2010 - 2013
    Posts
    142

    Add Today's Date And User Name

    Hi,

    I have the following vba code that loop through worksheets and pull the row(s) of data into summary worksheet.
    Range of row data , that is pulled through all worksheets is A27:AQ27 and in the next column "AR" I get the current date and in the column "AS" I get the username of the system.

    Meanwhile this task (Getting Current Date & UserName) is performed in isolated vba code (I have highlighted the code with blue fonts), that I have accomodated in this vba code because I dont know how to put code for current date and username after this line of code.
    Worksheets("Summary 4").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)

    But the Problem in the below HIGHLIGHTED code is that whenever the macro is run, it changes the old date with current date (The day when macro ran).
    Like suppose if a user ran macro on 8th Aug 13. The Column AR will fill down side by side with rows of data with current date.
    If after someday user again ran macro then the date 8th Aug 13 is changed with current day date.

    I dont want it to change the old date, whenever macro is run.

    Can anyone please get me out of this problem ? Here is the code

    Please Login or Register  to view this content.
    Last edited by Ariff_Chowdhury; 08-05-2013 at 08:40 PM.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Add Today's Date And User Name

    Sounds like you want to change
    If c.value<>"" then
    to
    If c.value="" then

  3. #3
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Karachi, Sindh, Pakistan
    MS-Off Ver
    Excel 2010 - 2013
    Posts
    142

    Re: Add Today's Date And User Name

    Dear yudlugar,

    This is not my requirements, what I need is to add a line or lines of code in above vba to get current and username in next available column.
    Please Login or Register  to view this content.
    I just want this above code to perform without loop as whenever macro is run the loop changes the old dates as well.
    Can you please re-visit to my above code ?

  4. #4
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Karachi, Sindh, Pakistan
    MS-Off Ver
    Excel 2010 - 2013
    Posts
    142

    Re: Add Today's Date And User Name

    BUMP - need a response

    Any developments in this regards ?

  5. #5
    Forum Contributor
    Join Date
    04-14-2013
    Location
    Karachi, Sindh, Pakistan
    MS-Off Ver
    Excel 2010 - 2013
    Posts
    142

    Re: Add Today's Date And User Name

    BUMP - Would really appreciate if anyone pleaseee give me some clue how to get this job done!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. condit. format: If date in cell = today, display "Today"
    By ratkins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2013, 01:33 PM
  2. [SOLVED] Macros for: If Today's Date minus other date is greater than certain amount of days Then
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-24-2012, 04:46 PM
  3. Replies: 1
    Last Post: 09-30-2012, 03:01 PM
  4. Replies: 6
    Last Post: 08-08-2011, 08:32 AM
  5. create a macro to alert me if today's date is within 5 days of expected delivery date
    By ashmcclure in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 09-25-2008, 05:51 PM

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