MedVision ad

how do I make a msg pop up on a certain date? (1 Viewer)

JCheng

New Member
Joined
Jun 7, 2003
Messages
8
Location
Beecroft
Gender
Female
HSC
2003
How do I program my program in VB6.0 to pop up a certain message on a specific date for every year?

Thanks! :)
 

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
Can you post or tell us about anything that you have already tried? That way, we are helping you with your problems rather than doing it for you. :)
 

JCheng

New Member
Joined
Jun 7, 2003
Messages
8
Location
Beecroft
Gender
Female
HSC
2003
I've tried this...
Code:
    If Date = [date] Then
        rtn = MsgBox("[message]", vbExclamation + vbOKOnly)
    Else
        rtn = MsgBox("[message]", vbExclaimation + vbOKOnly)
    End If
[code]
 

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
What is [date]?

You might want to make use of the Month and Day function. These two functions when you give it a Date, it will return the month and the day respectively.

So something like:

Code:
If Month(Date) = 12 AND Day(Date) = 12 Then
  MsgBox "Its the 12th of December"
End If
Will work and pop up the message when its the 12th of Decemeber.
 

JCheng

New Member
Joined
Jun 7, 2003
Messages
8
Location
Beecroft
Gender
Female
HSC
2003
Oh...Thanks sunny!
I didn't know there is a month and day function...only a beginner.
 

JCheng

New Member
Joined
Jun 7, 2003
Messages
8
Location
Beecroft
Gender
Female
HSC
2003
Oh...Thanks sunny!
I didn't know there is a month and day function...only a beginner.
 

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

Top