Msgbox code need tweeked

R

Richard

This code works great and i can live with it. But can it
be tweeked with a VBYESNO msgbox that if you click YES
that you have posted your drafts, then it wont remind you
every day till the 15th. But NO will still remind you.
Private Sub Workbook_Open()
If Day(Date) >= 10 And Day(Date) < 15 Then MsgBox "Have
you posted your drafts for Golds Gym ($28.00) and NetZero
($9.95) for the 15th.!", 48, "Automatic Drafts Reminder"
End Sub
Thanks in advance!
 
C

CLR

Hi Richard.............

It looks like it could use an "End if" before the "End Sub"................

Vaya con Dios,
Chuck, CABGx3
 
G

Guest

No, It doesn't
-----Original Message-----
Hi Richard.............

It looks like it could use an "End if" before the "End Sub"................

Vaya con Dios,
Chuck, CABGx3





.
 
C

CLR

You are correct, of course, Mr. (or Ms.) anonymous........it will work
without the "End if".........and besides that, on second reading of the
post, it appears I missed the entire point of the OP's
request...........sorry Richard, I don't know how to do what you're asking
for, but someone will for sure......hang in there.

Vaya con Dios,
Chuck, CABGx3
 
M

Myrna Larson

Not only will it work without the "End If", but it will NOT work with an "End
If". He wrote a single-line if statement.
 
G

Gord Dibben

Suggest you store the vbYesNo response in a cell or in the Registry.

Have your Workbook_Open check the value of that response.

If "yes" then Exit Sub. If "no" then show the message.

Gord Dibben Excel MVP


 
H

Harald Staff

Private Sub Workbook_Open()
Dim L As Long, M As Long
L = Month(Date) * 10000 + Year(Date)
M = GetSetting("Demo", "Drafts", "Month", 0)
If L = M Then Exit Sub
If Day(Date) >= 10 And Day(Date) < 15 Then
If MsgBox( _
"Have you posted your drafts for Golds Gym ($28.00)" & _
"and NetZero ($9.95) for the 15th.!", _
vbYesNo, "Automatic Drafts Reminder") = vbYes Then
Call SaveSetting("Demo", "Drafts", "Month", L)
End If
End If
End Sub

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top