+ Reply to Thread
Results 1 to 2 of 2

Compile Error: Invalid Outside Procedure Error

  1. #1
    Registered User
    Join Date
    07-31-2015
    Location
    Amurica
    MS-Off Ver
    Excel 2013
    Posts
    12

    Arrow Compile Error: Invalid Outside Procedure Error

    Hi everyone,

    I'm trying to run the below code, but run into the title error, highlighting "xlUp" in the third line. When I replace Potato2 with LastRow and a with i for the variables, the code runs fine. I'm not very knowledgeable about variables, so any advice with those would be great. Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Compile Error: Invalid Outside Procedure Error

    There is nothing wrong with the code.
    Potato2 is not defined in the code, you need to do the same as you did with the last row. The code will not run if Potato2 is nothing.

    Please Login or Register  to view this content.
    Last edited by AB33; 08-19-2015 at 02:24 PM.

+ 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. Run time error '5': Invalid procedure call or argument getting error
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2014, 04:48 AM
  2. “Compile error: Invalid Outside Procedure”
    By Rajeshkumar R in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-26-2013, 04:32 AM
  3. [SOLVED] Compile Error: Invalid Outside Procedure
    By packet25 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2013, 07:02 AM
  4. Error Message (Compile Error, Procedure too Large)
    By dreicer_Jarr in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 10-29-2010, 03:52 AM
  5. invalid outside procedure error
    By trum01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2009, 07:20 AM
  6. Compile Error: Invalid outside procedure
    By smylod in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2009, 01:56 PM
  7. Replies: 1
    Last Post: 02-17-2006, 12:10 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