+ Reply to Thread
Results 1 to 5 of 5

Reset used range to nothing

  1. #1
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Reset used range to nothing

    Hello.

    I need to reset the range used by a macro to nothing each time i run it so i use the following code:

    Please Login or Register  to view this content.
    Something is not working because when i manually press Ctrl+Shift+End after running the above code the selected area is still the one previously used. How can i reset it to nothing?

    Thanks a bunch for any helps.

    Octavio

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Reset used range to nothing

    All you need is:

    Please Login or Register  to view this content.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Re: Reset used range to nothing

    Hello Palmetto.

    Hmm. It's not working...
    I entered your code like this:

    Please Login or Register  to view this content.
    I'm wondering if it is not the correct way...
    I'm pulling my hair for hours and hours. The code i wrote enters subtotals on a list and works fine except for the Grand Total which does not appear in the last row but in a few hundreds of rows bellow, like there was data between the last row of the list and the Grand Total line. Arrrrrgggggg!!

    Thanks anyway. I'll keep on trying.

    Octavio

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Reset used range to nothing

    The code runs perfectly for me. In VBA you don't need to select sheets or cells, just qualify them in the line code. Perhaps you should explain more fully what you are trying to accomplish and maybe upload a sample workbook (sensitive data scrubbed).

    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Reset used range to nothing

    Please Login or Register  to view this content.
    The first line deletes the used range, the second resets it.
    Last edited by shg; 04-15-2010 at 02:46 PM.
    Entia non sunt multiplicanda sine necessitate

+ 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