+ Reply to Thread
Results 1 to 3 of 3

UsedRange Problem

  1. #1
    Registered User
    Join Date
    08-22-2008
    Location
    UK
    Posts
    13

    UsedRange Problem

    I am having real trouble trying to get the UsedRange to report the correct used range; here is my code that formats the sheet:

    Please Login or Register  to view this content.
    After the sheet is formatted the used range includes cells/rows that are well outside of the actual used range and everytime I run it the used range rows increases despite the actual data remaining the same size?! I've hardcoded the Sheets("Detail") to prove the process.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: UsedRange Problem

    see: http://www.rondebruin.nl/last.htm

    note the points re: use of xlCellTypeLastCell / UsedRange

  3. #3
    Registered User
    Join Date
    08-22-2008
    Location
    UK
    Posts
    13

    Re: UsedRange Problem

    Thanks DonkeyOte, problem solved now!

+ 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