Make control visible by day of the week

skwilliams

Registered User.
Local time
Today, 17:40
Joined
Jan 18, 2002
Messages
516
I have a button on a form that I would like to only be visible on Thursdays.

Is this possible?
 
Yes, in the form's open or load event you can use:

Code:
Me.YourControlName.Visible = (Format(Date(), "mmmm") = "Thursday")
 
Or ... a regionally independant method ...

Me.YourControlName.Visible = (WeekDay(VBA.Date,1) = 5)

... if you prefer to use constants ...

Me.YourControlName.Visible = (WeekDay(VBA.Date,vbSunday) = vbThursday)
 

Users who are viewing this thread

Back
Top Bottom