我有一个链接到宏的 Excel 按钮
我想让按钮文本本身根据当前日期显示当前月份。
这是一个如此简单的请求,但似乎很难找到答案
在网上广泛研究但没有任何运气
使用这个:
Sub Button()
Worksheets("Sheet1").Buttons("Button 1").Text = Format(Date, "mmmm")
End Sub
您还可以使用下面其他指定的月份格式之一:
Format(Date, "m") '3
Format(Date, "mm") '03
Format(Date, "mmm") 'Mar