+ Reply to Thread
Results 1 to 4 of 4

ActiveCell.SpecialCells(xlLastCell).Select

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    20

    ActiveCell.SpecialCells(xlLastCell).Select

    I am using ActiveCell.SpecialCells(xlLastCell).Select to point to the last used cell of my excel sheet which was 230. It works only for the first time. The next time, even if my sheet has only 90 rows, the last cell still remains as 230. can you pls help me on this?

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

    Re: ActiveCell.SpecialCells(xlLastCell).Select

    the usedrange/xllastcell method can be a bit tempermental... does your column have data in every row? If so, something like:
    Please Login or Register  to view this content.
    might work better for you.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,186

    Re: ActiveCell.SpecialCells(xlLastCell).Select

    Hi, SriramDorai,

    AFAIR you would need to save the workbook which should restore the UsedRange to the available range. It´s not a probelm when the range expands but (as you noticed) if there are rows or columns deleted.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,167

    Re: ActiveCell.SpecialCells(xlLastCell).Select

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ 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. .SpecialCells(xlLastCell).Select does not work in vbscript
    By ckb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2007, 12:58 PM
  2. [SOLVED] Fully Qualifying - ActiveCell.SpecialCells(xlLastCell)).Select
    By tmort in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2006, 03:35 PM
  3. specialcells(xlLastCell) and method global range error
    By tmort@ci.grand-rapids.mi.us in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2006, 04:55 PM
  4. [SOLVED] .Cells.SpecialCells(xlLastCell)
    By Simon Shaw in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-05-2005, 07:06 PM
  5. [SOLVED] SpecialCells(xlLastCell)
    By José Ignacio Bella in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-09-2005, 04:06 PM

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