+ Reply to Thread
Results 1 to 3 of 3

Thread: clear a range of cells on non active sheet with macro

  1. #1
    Registered User
    Join Date
    02-05-2011
    Location
    kuwait
    MS-Off Ver
    Excel 2007
    Posts
    26

    clear a range of cells on non active sheet with macro

    Dear all,

    Kindly advise me what is the Vba code to clear a range of cells from a non active sheet with a macro. I have two sheets where on sheet 2 i have a rectangle autoshape which will be use as a buton.

    Regards

  2. #2
    Valued Forum Contributor tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2003 - 2007
    Posts
    2,342

    Re: clear a range of cells on non active sheet with macro

    SEHRA,

    You can use the following. Change the sheetname and range as necessary:
    Sub ClearRangeMacro_for_SEHRA()
        
        Sheets("Sheet1").Range("A1:B10").ClearContents
        
    End Sub


    Hope that helps,
    ~tigeravatar

  3. #3
    Registered User
    Join Date
    02-05-2011
    Location
    kuwait
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: clear a range of cells on non active sheet with macro

    Thanks a lot

+ 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.2.0