Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    47

    Unanswered: Convert substring to an long integer

    Hi,

    I have year as a string "2003/04"

    I would like to have this turned into a number 2004.

    How can I do this in VBA?

    Rgds

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    so you do not end up dealing with two digits for the year, use:

    intYear = cint(left(YourStringVariable,4)) + 1

Posting Permissions

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