1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

VB Code - Will be easy for anyone familiar with it

Discussion in 'Other PC Software' started by Geordie, 2003/03/07.

Thread Status:
Not open for further replies.
  1. 2003/03/07
    Geordie

    Geordie Inactive Thread Starter

    Joined:
    2002/10/17
    Messages:
    241
    Likes Received:
    0
    Im using VB Editor in Excel for an assignment.

    I have to set code for current date, which I have behind the userform, this being:

    txtdate = Date

    That works fine...heres the bit I cant do.

    In this project the person who buys the computer gets a 500 day guarantee, so I need to set a piece of code so it tells you in another text box, named txtExpiry to tell you the exact date of the guarantees expiry date.

    Any takers?

    Cheers. :)
     
  2. 2003/03/07
    Geordie

    Geordie Inactive Thread Starter

    Joined:
    2002/10/17
    Messages:
    241
    Likes Received:
    0
    Nevermind. Done it. :rolleyes:
     

  3. to hide this advert.

  4. 2003/03/08
    Dorfmann

    Dorfmann Inactive

    Joined:
    2002/04/26
    Messages:
    100
    Likes Received:
    0
    You should work for the government.

    Code:
    Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    
        If IsDate(TextBox1.Text) Then
            TextBox2.Text = DateAdd( "d ", 500, TextBox1.Text)
        End If
        
    End Sub
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.