+ Reply to Thread
Results 1 to 4 of 4

Compile Error: Invalid outside procedure

  1. #1
    Registered User
    Join Date
    11-05-2019
    Location
    Space Coast, FL
    MS-Off Ver
    2016
    Posts
    2

    Question Compile Error: Invalid outside procedure

    I'm sure I'm overlooking something simple...but I've been getting this error message all morning and cannot figure out what I am missing...

    Compile error:
    Invalid outside procedure

    I'm trying to implement code on my CURRENT PROJECTS tab, to move rows that have "complete" entered into column L or 12 to another tab named COMPLETED PROJECTS.

    Update_to_COMPLTETED Macro
    ' This macro will update the CURRENT PROJECTS tab and move complete projects from column L to COMPLETED PROJECTS tab.
    '
    'Keyboard Shortcut: Ctrl+c
    'Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 11 And Target.Value = "Complete" Then
    'Define last row on completed worksheet to know where to place the row of data
    LrowCompleted = Sheets("COMPLETED_PROJECTS").Cells(Rows.Count, "A").End(xlUp).Row 'Copy and paste data
    Range("A" & Target.Row & ":L" & Target.Row).Copy Sheets("Completed").Range("A" & LrowCompleted + 1)
    .PasteSpecial Paste:=xlPasteValues
    'Delete Row from CURRENT PROJECTS
    Range("A" & Target.Row & ":M" & Target.Row).Delete xlShiftUp
    End If

    End Sub



    Any suggestions?

  2. #2
    Forum Contributor
    Join Date
    11-05-2019
    Location
    Tiki Island, TX
    MS-Off Ver
    Office 365
    Posts
    168

    Re: Compile Error: Invalid outside procedure

    Not sure about the error but there are a couple of obvious things you should take a look at:
    One place you have the sheet named: Sheets("COMPLETED_PROJECTS")
    In another place you have the sheet named: Sheets("Completed")
    ]You also don't identify the Current Projects sheet when deleting the row. Is it possible you didn't paste all of the code in the question?

  3. #3
    Registered User
    Join Date
    11-05-2019
    Location
    Space Coast, FL
    MS-Off Ver
    2016
    Posts
    2

    Re: Compile Error: Invalid outside procedure

    DavidBowman - thank you for your reply! As a newbie..... I do apologize for the mistakes.

    In another place you have the sheet named: Sheets("Completed") Here I am trying to copy/paste/delete the row from CURRENT to COMPLETED - should I use something other than Sheets?

    You also don't identify the Current Projects sheet when deleting the row. Is it possible you didn't paste all of the code in the question? I've been working on this so long today that somehow I managed to remove the last portion of my code!!! Time to go home I guess

  4. #4
    Forum Contributor
    Join Date
    11-05-2019
    Location
    Tiki Island, TX
    MS-Off Ver
    Office 365
    Posts
    168

    Re: Compile Error: Invalid outside procedure

    Sheets is okay but the name of it should be consistent - either "COMPLETED_PROJECTS" or "Completed" surely you don't have two sheets with those two different names that you are copying between? If you have referenced a worksheet that doesn't exist it can cause error.s

+ 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. Compile Error : Invalid outside procedure is popped
    By stephen.sabs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2019, 05:32 AM
  2. Compile Error: Invalid Outside Procedure Error
    By pschris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2015, 01:51 PM
  3. “Compile error: Invalid Outside Procedure”
    By Rajeshkumar R in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-26-2013, 04:32 AM
  4. [SOLVED] Compile Error: Invalid Outside Procedure
    By packet25 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2013, 07:02 AM
  5. Invalid Outside procedure error
    By rmagers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2010, 08:45 PM
  6. invalid outside procedure error
    By trum01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2009, 07:20 AM
  7. Compile Error: Invalid outside procedure
    By smylod in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2009, 01:56 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