+ Reply to Thread
Results 1 to 5 of 5

Clearing a Worksheet

  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Clearing a Worksheet

    Hi,

    What's the fastest way to clear a worksheet? I want to delete the contents of every cell without deleting any code from my module.

    The reason I ask is, I'm reading from a text file into excel.

    I want to run my code to read text into excel one time through. Then i want to delete all the text, make some alterations to my code, and run the code again. That way each time the worksheet is fresh and clear before i run the code.

    Thanks for the help!
    Last edited by CrazyFileMaker; 04-16-2009 at 07:42 PM.

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Clearing a Worksheet

    Add this line to your macro where you want the sheet cleared...

    Please Login or Register  to view this content.
    Of course this is for the activesheet, so if you are loading to a specific sheet you'll need to add the sheet name.

  3. #3
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Re: Clearing a Worksheet

    Thanks Chance! Worked perfectly

  4. #4
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Clearing a Worksheet

    CrazyFileMaker,

    Click the box above the "1", and to the left of "A".

    Then click on "Edit", "Clear", "All".

    Then click on cell A1.

    Or, you could record a macro to do the same.

    Or, try:

    Please Login or Register  to view this content.

    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  5. #5
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Re: Clearing a Worksheet

    Thanks Stan! I like having different options.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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