Command button help

Kiwi-123
Kiwi-123 used Ask the Experts™
on
Please can you help me with a command button.

I want to place todays date in C3 and the first day of the month in C2


Private Sub CommandButton1_Click()

?????

End Sub
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Analyst Assistant
Commented:
Something like this perhaps
Range("C3") = Date

' if you want the day name of the first day
Range("C2") = Format(DateSerial(Year(Date), Month(Date), 1), "dddd")

' if you want the actual date just lose the formatting
Range("C2") = DateSerial(Year(Date), Month(Date), 1)

Open in new window

Commented:
Private Sub CommandButton1_Click()
Cells(3, 3).Value = Date
Cells(2, 3).Value = DatePart("m", Date)
End Sub

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial