+ Reply to Thread
Results 1 to 3 of 3

Format(Now) will not work for Feb.+

Hybrid View

  1. #1
    Registered User
    Join Date
    04-26-2005
    Posts
    13

    Format(Now) will not work for Feb.+

    I'm using the logic below to update items for the current date. This works fine for January, but won't work for Feb. and on for some reason...

    Any help will be greatly appreciated!

    Today = Format(Now, "M/DD/YYYY")

    col_Numb = 1


    'Find the current date for update

    Do

    col_Numb = col_Numb + 1

    Loop Until Sheet1.Cells(5, col_Numb).Value = Today Or col_Numb = 25


    TIA

  2. #2
    keepITcool
    Guest

    Re: Format(Now) will not work for Feb.+


    supposing your sheet holds dateserials, why make Today a string?

    assign it like
    Today = Date (today must be dimmed as a variant or a date/time.

    even simpler to dmnp your today variable and do:

    Loop Until col_Numb = 25 or Sheet1.Cells(5, col_Numb).Value = Date



    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    cultgag wrote :

    >
    > I'm using the logic below to update items for the current date. This
    > works fine for January, but won't work for Feb. and on for some
    > reason...
    >
    > Any help will be greatly appreciated!
    >
    > Today = Format(Now, "M/DD/YYYY")
    >
    > col_Numb = 1
    >
    >
    > 'Find the current date for update
    >
    > Do
    >
    > col_Numb = col_Numb + 1
    >
    > Loop Until Sheet1.Cells(5, col_Numb).Value = Today Or col_Numb
    > = 25
    >
    >
    > TIA


  3. #3
    Registered User
    Join Date
    04-26-2005
    Posts
    13
    I dumped Today like you said and it worked like a charm!

    THANKS!


+ 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