Results 1 to 4 of 4

Error: "Argument is not an option" on Macro

Threaded View

  1. #1
    Registered User
    Join Date
    02-19-2008
    Posts
    52

    Error: "Argument is not an option" on Macro

    This Thread describes a function that I've found incredibly useful to reset the "last used cell" in a worksheet.

    I use this function a lot, and I would like to make a macro out of it. I have a menu-item added in my excel that runs the macro;

    Public Sub Reset_lastcell(wS As Worksheet)
        ActiveSheet.UsedRange
        wS.UsedRange
    End Sub
    But attempting to run it gives me the error "Argument is not an option".

    Just copying and paste the code into the "view code" for a worksheet will reset the "last used cell" when a spreadsheet is openned. See above mentioned thread for more detailed descriptions of the problem this solves.

    Please advise on how I can a. fix the menu-item I've created to make it solve the problem described in the above linked thread, or b. help me come up with another option to use (repeatedly, so hopefully easily) on multiple workbooks with this problem.

    Thanks!
    My Last Try At This
    Last edited by Luminary Xion; 02-05-2009 at 08:53 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