fiirst of the month clear cells

joshuajoseph09
joshuajoseph09 used Ask the Experts™
on
I need a code that if it the first of the month then clear the cells, but only on a button click
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This clears the entire sheet
If you just need to clear a particular range then change it to

Range("A1:D100").Clear

Assign this to a button or the QAT dpending which version you are using

Sub ClearCellsOnFirst()

    If Day(Date) = 1 Then
        Cells.Clear
    End If

End Sub
What is QAT ?
In Office 2007/2010 it is the Quick Access Toolbar
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.

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