+ Reply to Thread
Results 1 to 6 of 6

Compile Error upon selection

  1. #1
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Compile Error upon selection

    Hi, I'd like avoid a compile error in my selection in my combo box, The form works fine but i receive a compile error when i select an option:




    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,422

    Re: Compile Error upon selection

    Please post a sample workbook with some typical data and ALL the code.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Compile Error upon selection

    Hi,

    You must remove either of the first two lines of code. It is incorrect to have two declaration lines.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,422

    Re: Compile Error upon selection

    It is incorrect to have two declaration lines.
    That's why I asked to see all the code so we can see the context.

    I wouldn't really expect anything to compile/execute with something like that present.

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Compile Error upon selection

    Quote Originally Posted by TMS View Post
    I wouldn't really expect anything to compile/execute with something like that present.
    It will however. The error will only trigger when the change event is triggered- unless you manually attempt to compile the project.

  6. #6
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: [SOLVED]Compile Error upon selection

    Thanks chaps, I could see it when you pointed it out, Many Thanks

+ 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. [SOLVED] Compile Error: Wrong number of arguments or invalid property assignment Error
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-22-2016, 05:29 PM
  2. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  3. [SOLVED] Compile Error in Hidden Module and Compile Error: Can't find project or library
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-10-2013, 07:03 PM
  4. Compile list from selection.
    By Environment in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-19-2011, 07:17 AM
  5. Syntax Error and Compile Error: Expected Line Number or Label...
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-31-2011, 09:59 AM
  6. compile error: compile error expected
    By odeno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2008, 04:30 PM
  7. VBAProject name compile error, not defined at compile time
    By Matthew Dodds in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2005, 03:20 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