+ Reply to Thread
Results 1 to 2 of 2

putting value in a cell instead of the formula via vba

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154

    putting value in a cell instead of the formula via vba

    I have this line of code as part of a macro

    ActiveCell.FormulaR1C1 = "=""Last Updated: ""&TEXT(NOW(),""dd-mmm-yyyy"")"

    but what I need is to put the actual value ot the NOW() function into the cell rather than the function itself. this is because putting the function itself in the cell means that cell is always equal to NOW, but what I want is that cell to be equal to the date this macro was run, so it has to be the value and not the function.

    anyone?

    thanks

  2. #2
    Registered User
    Join Date
    02-09-2004
    Location
    The Netherlands
    Posts
    46
    Use this:
    ActiveCell.Value = "Last Updated: " & Format(Now(), "dd-mmm-yyyy") & ""

+ Reply to Thread

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