Solved

fiirst of the month clear cells

Posted on 2011-02-27
5
720 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 101

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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

623 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