Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Maryland, USA
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    posting a current date in macro (2000)

    I would like to thank everyone for the short cut on ctrl ;. I change the format cell to month and year. All I'm getting is January 00 or if I choose month I get "J". Does anyone know what I'm doing wrong. Thank you for your help.

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: posting a current date in macro (2000)

    LAURIEC

    How are you changing the format? I tried everything I know and could not make it come up with J.

    Change the format to number and see if it gives you 37194 for 10/30/2001. This is the Julian date number. If it gives you some other number, well Oh boy...

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: posting a current date in macro (2000)

    Have you tried a format MMM YYYY, which should show Jan 2001for a date in Januray 2001.

    Andrew C

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: posting a current date in macro (2000)

    Wassim,

    37194 is a serial date as decided by Microsoft. The Julian date for Oct 30 2001 is 01303, i.e. the last 2 digits of the year and the day number of the year.

    Andrew

  5. #5
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: posting a current date in macro (2000)

    Attached is Laurie's workbook which she emailed me privately. It has boggled my mind! No matter what date you put in cell L2, it just displays 0 (or Jan 0, 1900)! There are a couple of bunny trails; I'll point then out: If you view the code for this sheet, there are two macros which you can delete. There are also some old XL5-type macros beginning at row 104; delete those also. Happy hunting!
    Attached Files Attached Files
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: posting a current date in macro (2000)

    Select Options from the Tools menu, then click on the Transition tab. Remove the check mark from in front of "Transition formula evaluation" and "Transition formula entry." The go to the cell where the date is entered and remove the equal sign from in front of it, and press enter. The date should now behave properly.
    Legare Coleman

  7. #7
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: posting a current date in macro (2000)

    Pure genius! You are the <img src=/S/king.gif border=0 alt=king width=21 height=22> <img src=/S/exclamation.gif border=0 alt=exclamation width=15 height=15>
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  8. #8
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: posting a current date in macro (2000)

    SammyB

    I opened the workbook with Excel 97 SR-2 (i) I changed the contents of cell L2 from =10/30/2001 to 10/30/2001 and I guess it reverted to =10/30/2001.

    Well this is not a surprise since you are dividing 10 by 30 by 2001 which will get you a very small number rounded to 0 which will yield the date 01/00/1900.

    Now I could not find the code you refer to, and when I opened the workbook the virus detector did not see any code, but I guess you may have sent the workbook after you deleted the code.

    Check the workbook and tell me if I missed anything.

    Wassim
    Attached Files Attached Files
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  9. #9
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: posting a current date in macro (2000)

    It reverts to =10/30/2001 because the "Transition formula entry" option is set. See my reply from last night.
    Legare Coleman

Posting Permissions

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