+ Reply to Thread
Results 1 to 4 of 4

Compile error: variable not defined

  1. #1
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    8

    Compile error: variable not defined

    New to VBA and just trying to make some edits to some existing code. I have basically copied a pre-existing form and module and changed names from "Appendix" to "Drawing" as I am trying to replicate what the piece of code already produces for a table of appendices, for my drawings. However, when I try and run the form I get Compile error: Variable not defined with lstDrawings highlighted.

    Please Login or Register  to view this content.
    Is this something that should be defined in my global module which I am missing?

    Any help is much appreciated.

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

    Re: Compile error: variable not defined

    What is lstDrawings?
    Last edited by AB33; 08-12-2014 at 03:50 AM.

  3. #3
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Compile error: variable not defined

    iNextDraw is already defined as an Integer. It is the following section of code which is returning the compile error:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Compile error: variable not defined

    You need to define 1stDrawings

    Dim 1stDrawings as something

+ 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 Variable not defined...?
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2013, 01:59 AM
  2. Compile error: Variable not defined
    By Francisco Sousa in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-17-2013, 04:02 PM
  3. Compile error variable not defined
    By AsifShabbir in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-04-2011, 10:53 AM
  4. Compile Error Variable not Defined
    By Mooseman60 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2010, 10:13 AM
  5. Compile error, variable not defined
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-19-2005, 12:06 PM

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