0
votes

I just want to be able to open my userform only on specific days of the week. Let's say I want to open it on a Monday, I got a msgbox "You can only use this on Fridays" And then I can open my userform when it's Friday.

I don't know what I can use : "OnTime", "Weekday" ?

Help me please

1
How did you try using Weekday?BigBen
You can use the Workbook_Open-Event and then check for the Weekday Weekday(Now, vbMonday) and then build some logic, which will trigger the userformMGP

1 Answers

0
votes

Assuming your locale has English day-names, invoke the Userform with something like:

Sub dural()
    If Format(Now, "dddd") <> "Friday" Then
        MsgBox "only on Fridays"
    Else
        UserForm1.Show
    End If
End Sub