Visual basic help required... PLEASE!!!

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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?!
 
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"
 
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.
 

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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top