+ Reply to Thread
Results 1 to 3 of 3

Clearing Cells

  1. #1
    Registered User
    Join Date
    05-01-2006
    Posts
    16

    Clearing Cells

    Hi,

    I want to clear some cells within another sheet when a button is pressed on a different sheet, the code i have so far is:

    Sheets("February Stats").Select
    ActiveSheet.Range("C8:R63").Select
    Selection.ClearContents

    But this obviously takes u into that sheet before deleting, so I then have put a bit of code at the end that takes me back.

    Is there a way to clear cells in another sheet, without having to actually select it?

    Thanks

    Andy

  2. #2
    Die_Another_Day
    Guest

    Re: Clearing Cells

    Sheets("February Stats").Range("C8:R63").ClearContents

    HTH

    Die_Another_Day
    Andyd74 wrote:
    > Hi,
    >
    > I want to clear some cells within another sheet when a button is
    > pressed on a different sheet, the code i have so far is:
    >
    > Sheets("February Stats").Select
    > ActiveSheet.Range("C8:R63").Select
    > Selection.ClearContents
    >
    > But this obviously takes u into that sheet before deleting, so I then
    > have put a bit of code at the end that takes me back.
    >
    > Is there a way to clear cells in another sheet, without having to
    > actually select it?
    >
    > Thanks
    >
    > Andy
    >
    >
    > --
    > Andyd74
    > ------------------------------------------------------------------------
    > Andyd74's Profile: http://www.excelforum.com/member.php...o&userid=34013
    > View this thread: http://www.excelforum.com/showthread...hreadid=567113



  3. #3
    Die_Another_Day
    Guest

    Re: Clearing Cells

    Sheets("February Stats").Range("C8:R63").ClearContents

    HTH

    Die_Another_Day
    Andyd74 wrote:
    > Hi,
    >
    > I want to clear some cells within another sheet when a button is
    > pressed on a different sheet, the code i have so far is:
    >
    > Sheets("February Stats").Select
    > ActiveSheet.Range("C8:R63").Select
    > Selection.ClearContents
    >
    > But this obviously takes u into that sheet before deleting, so I then
    > have put a bit of code at the end that takes me back.
    >
    > Is there a way to clear cells in another sheet, without having to
    > actually select it?
    >
    > Thanks
    >
    > Andy
    >
    >
    > --
    > Andyd74
    > ------------------------------------------------------------------------
    > Andyd74's Profile: http://www.excelforum.com/member.php...o&userid=34013
    > View this thread: http://www.excelforum.com/showthread...hreadid=567113



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1