Solved

fiirst of the month clear cells

Posted on 2011-02-27
5
718 Views
Last Modified: 2012-06-21
I need a code that if it the first of the month then clear the cells, but only on a button click
0
Comment
Question by:joshuajoseph09
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
TinTombStone earned 500 total points
ID: 34992125
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
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34992284
What is QAT ?
0
 
LVL 6

Expert Comment

by:TinTombStone
ID: 35034346
In Office 2007/2010 it is the Quick Access Toolbar
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35275419
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.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question