Results 1 to 5 of 5

Modification required in the code line which finds the Last column

Threaded View

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Modification required in the code line which finds the Last column

    Dear Friends,

    I get an error message:
    The Error 91 (Object variable not set) appears when executed & debugged in the following line.

    LastColumn = Cells.Find(What:="*", After:=[A3], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious) _
            .Column
    Basically, the above line finds the last used column to execute further. In the workbook, the first column is hidden.

    As my data sheet is already designed, I need to select the columns A:CY only. I don't want to extend the selection further to select the data. But Rows may vary.

    Or, any other reason for the above Error?

    Please help me to modify the code.

    Thanks in advance.

    acsishere.
    Last edited by acsishere; 07-25-2008 at 01:56 PM.

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