Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Put date in cell! (WinNT4, XL97)

    That's all I want to do! Put the current date and time in a cell, as a string. But the <img src=/w3timages/censored.gif alt=censored border=0> software won't do it! This:

    Cells("I4").value = format(now, "dd/MM/yy hh:mm")

    is the gist of it - I've tried using variables defined as strings and dates and not defined at all, not using variables (as above), formatting the cell concerned as text and every possible version of stepping through this I can think of and it just says 'type mismatch every <img src=/w3timages/censored.gif alt=censored border=0> time!!!!

    Aaaarrggghhhh!!!!! <img src=/S/flee.gif border=0 alt=flee width=25 height=25>

    What should I be using, please?! <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>
    Beryl M


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Put date in cell! (WinNT4, XL97)

    Either use Cells(4, 9) = Now , or Range("I4") = Now . You can't use Cells with a string argument.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Put date in cell! (WinNT4, XL97)

    <img src=/S/woops.gif border=0 alt=woops width=58 height=36> I knew it had to be something silly!
    Beryl M


Posting Permissions

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