![]() |
Tweaking Code
Is there a way to once you input your info in the userform and click either
"yes" or "no" on the msgbox to not ask you again over the next 5 days. I need all info answered only once. Thanks in advance! If Month(Date) = 2 Then If Day(Date) = 23 And Day(Date) < 27 Then UserForm1.Show If MsgBox("Do you qualify for Bank Day?", _ vbYesNo) = vbYes Then Worksheets("Vacation").Range("C3").Value = 1 Else Worksheets("Vacation").Range("C3").Value = 0 End If End If End If |
Tweaking Code
You need to store the data that you last asked somwhere, a hidden sheet
perhaps. then you can validate the stored date to check if it was within the last 5 days. -- HTH... Jim Thomlinson "Richard" wrote: Is there a way to once you input your info in the userform and click either "yes" or "no" on the msgbox to not ask you again over the next 5 days. I need all info answered only once. Thanks in advance! If Month(Date) = 2 Then If Day(Date) = 23 And Day(Date) < 27 Then UserForm1.Show If MsgBox("Do you qualify for Bank Day?", _ vbYesNo) = vbYes Then Worksheets("Vacation").Range("C3").Value = 1 Else Worksheets("Vacation").Range("C3").Value = 0 End If End If End If |
Tweaking Code
A bit over my head, but thanks anyway
"Jim Thomlinson" wrote: You need to store the data that you last asked somwhere, a hidden sheet perhaps. then you can validate the stored date to check if it was within the last 5 days. -- HTH... Jim Thomlinson "Richard" wrote: Is there a way to once you input your info in the userform and click either "yes" or "no" on the msgbox to not ask you again over the next 5 days. I need all info answered only once. Thanks in advance! If Month(Date) = 2 Then If Day(Date) = 23 And Day(Date) < 27 Then UserForm1.Show If MsgBox("Do you qualify for Bank Day?", _ vbYesNo) = vbYes Then Worksheets("Vacation").Range("C3").Value = 1 Else Worksheets("Vacation").Range("C3").Value = 0 End If End If End If |
Tweaking Code
Did you see my post from yesterday?
'------------------------------------------------- Add the following line after UserForm1.Show... "If Len(Worksheets(1).Range("C3").Value) = 0 Then" Also, add another "End If" at the bottom. '------------------------------------------------- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Richard" wrote in message ... A bit over my head, but thanks anyway "Jim Thomlinson" wrote: You need to store the data that you last asked somwhere, a hidden sheet perhaps. then you can validate the stored date to check if it was within the last 5 days. -- HTH... Jim Thomlinson "Richard" wrote: Is there a way to once you input your info in the userform and click either "yes" or "no" on the msgbox to not ask you again over the next 5 days. I need all info answered only once. Thanks in advance! If Month(Date) = 2 Then If Day(Date) = 23 And Day(Date) < 27 Then UserForm1.Show If MsgBox("Do you qualify for Bank Day?", _ vbYesNo) = vbYes Then Worksheets("Vacation").Range("C3").Value = 1 Else Worksheets("Vacation").Range("C3").Value = 0 End If End If End If |
All times are GMT +1. The time now is 11:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com