Martin_H
Board Regular
- Joined
- Aug 26, 2020
- Messages
- 190
- Office Version
- 365
- Platform
- Windows
Hi team,
I am building a custom ribbon UI Workbook.
I am using this (see below) to get Today's Date.
+
Then I am using this (see below) to get Today's Weekday Name.
+
Now I would like to get Today's Weeknumber.
Normally I am using this formula =WEEKNUM(TODAY(),21) to get the right Weeknumber (mind the 21 at the end of the formula).
I would like to implement it the same way as the codes above.
Thank you.
Much appreciated.
I am building a custom ribbon UI Workbook.
I am using this (see below) to get Today's Date.
VBA Code:
Function mydate()
mydate = Date
End Function
VBA Code:
Sub DATE(control As IRibbonControl, ByRef label)
label = "" & mydate & ""
End Sub
Then I am using this (see below) to get Today's Weekday Name.
VBA Code:
Function myweekdayname()
myweekdayname = WeekdayName(1, False, vbMonday)
End Function
VBA Code:
Sub WeekdayName(control As IRibbonControl, ByRef label)
label = "" & myweekdayname & ""
End Sub
Now I would like to get Today's Weeknumber.
Normally I am using this formula =WEEKNUM(TODAY(),21) to get the right Weeknumber (mind the 21 at the end of the formula).
I would like to implement it the same way as the codes above.
Thank you.
Much appreciated.