+ Reply to Thread
Results 1 to 17 of 17

Compiler Error: Variable not defined (Error Associated with Combobox)

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Question Compiler Error: Variable not defined (Error Associated with Combobox)

    Hi Guys,

    I am using combobox change procedure to fill another combobox according to values selected in combo1.
    but receiving an error message "Compile Error: Variable Not Defined". Kindly check the code and suggest the solution.

    Best Regards,
    Hussaini

    Please Login or Register  to view this content.
    Attached Images Attached Images

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Are you sure that it's not elsewhere in the sheet?
    Last edited by Kyle123; 04-23-2015 at 05:15 AM.

  3. #3
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Please see below the complete code in procedure.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Are you sure that you have all the controls on the worksheet? Isn't there anything highlighted in blue when you get that message?

  5. #5
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Nothing gets highlighted with blue only first line gets yellow as shown in image. Capture1.JPG

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Ok, time you uploaded a workbook

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Kyle! Kindly help me getting out this problem. Thanks.
    Last edited by asgharhussaini; 04-23-2015 at 05:48 AM.

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Did you read my last post? - we are helping you. Why are you asking again? You're being a bit rude.

  9. #9
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    File attached please check. and sorry Kyle nothing like that. I am thankful to you.
    I have deleted some data which is being called by filters on report sheet to bring the attachment into acceptable size.

    Thanks.
    Attached Files Attached Files
    Last edited by asgharhussaini; 04-23-2015 at 05:47 AM.

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Your workbook works fine for me, I suggest you close and re-open. Also, have a look here:http://dailydoseofexcel.com/archives...ivex-controls/

  11. #11
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Kindly close an re-open the file again to receive again. may 2 to 3 times you will see the error.

    I tried but didn't find any "*.exd" file in C drive

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    I do not get the error. Have you checked the name of the comboboxes and cleared out the .exd files?

  13. #13
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    I tried but didn't find any "*.exd" file in C drive. I didn't see any problem in combobox names.

  14. #14
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    Then I'm afraid I can't help you

  15. #15
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    The problem is not solved Guys! please help help help

  16. #16
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    I can't replicate the problem you describe in your first post, though I do get a 'subscript out of range' error here.
    Please Login or Register  to view this content.
    That's because there is no worksheet named 'Home' in the uploaded workbook which makes me wonder if the workbook you've uploaded is actually the one you are having the problem with.
    If posting code please use code tags, see here.

  17. #17
    Registered User
    Join Date
    01-17-2013
    Location
    Karachi
    MS-Off Ver
    Excel 2003 + Excel 2010
    Posts
    19

    Re: Compiler Error: Variable not defined (Error Associated with Combobox)

    It had a confidential stuff so I deleted it but it doesn't have any contribution in subject problem.
    Kindly try to suggest the solution I will be thankful to you.

+ 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. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  2. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  3. Replies: 2
    Last Post: 09-12-2012, 01:01 PM
  4. [SOLVED] Macro error - Run time error 1004 (App defined/Object Defined error)
    By jlax34 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-06-2012, 03:02 PM
  5. ComboBox-programming / Compile Error: Variable not defined
    By katharil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2012, 07:40 AM

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