Results 1 to 12 of 12

Compile Error: Argument not optional

Threaded View

  1. #1
    Registered User
    Join Date
    08-11-2021
    Location
    Florida
    MS-Off Ver
    Excel 2019
    Posts
    75

    Compile Error: Argument not optional

    I am trying to auto sort a table by date,

    I am putting the sort code into a module then calling on the sheet page where the table is located.

    my call is:
    Private Sub Worksheet_Change(ByVal Target As Range)
        Call AutoUpdater
    End Sub
    my Module code it:

    Option Explicit
    
    Sub AutoUpdater(ByVal Target As Range)
        On Error Resume Next
        If Application.Intersect(Target, Application.Columns(1)) Is Nothing Then Exit Sub
        If Target.Count > 1 Then Exit Sub
        Range("E14").Sort Key1:=Range("E15"), Order1:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    End Sub
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by DropAGearN'Disappear; 08-19-2021 at 11:10 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Compile Error Argument not optional
    By ZFrost27 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-25-2018, 05:45 PM
  2. Compile error argument not optional
    By wayneatkins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-07-2015, 08:08 AM
  3. i am getting Compile error: Argument not optional
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-26-2014, 06:27 AM
  4. Compile Error: Argument not optional
    By no.18shirt in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-09-2013, 10:59 AM
  5. [SOLVED] Compile error: Argument not optional
    By darkhangelsk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2013, 06:12 AM
  6. Argument not optional - Compile error
    By dsrfinancial in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2012, 07:34 AM
  7. Compile Error: Argument not optional
    By Brett Smith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2006, 01:45 PM

Tags for this Thread

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