1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Visual basic help required... PLEASE!!!

Discussion in 'Software Development' started by davebrown19, Mar 26, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. davebrown19

    davebrown19 Thread Starter

    Joined:
    Mar 16, 2008
    Messages:
    7
    Using visual basic on an insurance claims system, the following code produce a message box that displays the date in a weeks time:

    Sub main
    Dim nextweek
    nextweek=CVar(Date)+7
    MsgBox "One week from today is: " & Format(nextweek,"ddddd")
    End Sub

    What i want, is for the macro to just input that date in normal text onto the system, not to come up in a message box.

    Basically i want a macro that will automatically input the date a week in advance.

    Any ideas?!
     
  2. the mitchness

    the mitchness

    Joined:
    Mar 29, 2008
    Messages:
    18
    Private Sub Command1_Click()
    Dim nextweek
    nextweek = CVar(Date) + 7
    Text1.Text = "One week from today is: " & Format(nextweek, "ddddd")
    End Sub


    This code worked flawless for me. I will send a screenshot and whole project if you want. "includes one form, one button, one text box, and literally, only that code, nothing else"
     
  3. the mitchness

    the mitchness

    Joined:
    Mar 29, 2008
    Messages:
    18
    I will be more than happy to help further as much as I can knowing I haven't been into programming as much. I haven't opened vb6 in about 7 months after making my last public, free program, which they all should be.
     
  4. davebrown19

    davebrown19 Thread Starter

    Joined:
    Mar 16, 2008
    Messages:
    7
    Whatever you can supply would be much appreciated.

    I will try the above code tomorrow when i have access to the system.

    I really appreciate your help.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/697199

  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.
    Dismiss Notice