+ Reply to Thread
Results 1 to 6 of 6

Not Recognizing UsedRange

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    228

    Not Recognizing UsedRange

    Hello Everyone,

    I have some code here that looks like its doing everything correctly except at the end when I ask the macro to copy the UsedRange, it returns a blank. I'm not sure why.

    Could someone please take a look at this and let me know if there is something I'm missing? Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Not Recognizing UsedRange

    Works fine for me on a quick dummy workbook, I'd suggest uploading a workbook to get a quicker answer as to what is wrong.

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    228

    Re: Not Recognizing UsedRange

    Strange... I closed the workbook so I could make a test one for you, then I opened it back up and ran the same exact code and it worked!

    I apologize for taking up your time. Thanks for your help though!

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Not Recognizing UsedRange

    You will experience the same problem again until you change this line

    Please Login or Register  to view this content.
    Active sheet happens to be where ever your cursor is. Change the active sheet in to sheet name.

  5. #5
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Not Recognizing UsedRange

    @AB33,

    There is a sheets.add command on the previous line so the activesheet should always be the correct one in this case.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Not Recognizing UsedRange

    Yes,
    But this line

    Please Login or Register  to view this content.
    will also create another error if you re-run the code as the sheet name already exists.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. UsedRange
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2011, 09:46 AM
  2. UsedRange
    By LB79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2010, 08:39 AM
  3. UsedRange
    By azizrasul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2008, 06:21 AM
  4. [SOLVED] USEDRANGE
    By ak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2006, 12:15 AM
  5. [SOLVED] usedRange
    By GC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2005, 09:06 AM

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