Consulting

Results 1 to 7 of 7

Thread: ComboBox Function Lost

  1. #1
    VBAX Newbie
    Joined
    Jun 2020
    Posts
    3
    Location

    ComboBox Function Lost

    This is something that i don't understand. This code has been working for years, but now for some reason, it won't. There are a simple couple of comboBoxes (ComboBox1 and ComboBox2). Now when I try to run, I get a compile error because these are not recognized. If I go into the spreadsheet where the combo boxes are, and right click on them, I do not get a properties option like before, but now Excel thinks that these are pictures. The name box still says ComboBox1, but there is nothing in the value box. On a similar working file it says =EMBED("Forms.ComoBox1",""). I tried typing this in, but that didn't work. I also tried assigning macros and even deleting and re-inserting the boxes. Nothing seems to work. I can compare this bad file to similar files used in different areas that function just fine. There is no difference in the code. Any ideas?

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    Clean up the workbook with the problem and attach it here
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Newbie
    Joined
    Jun 2020
    Posts
    3
    Location
    Quote Originally Posted by Paul_Hossler View Post
    Clean up the workbook with the problem and attach it here
    I attempted to upload, but I got an error message from VBA Express stating that upload attempt failed (3 times). It may be because the file is over 5 Mbytes.

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    I'd say so

    Delete everything that is not needed to show the issue and try again
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  5. #5
    VBAX Newbie
    Joined
    Jun 2020
    Posts
    3
    Location
    Quote Originally Posted by Paul_Hossler View Post
    I'd say so

    Delete everything that is not needed to show the issue and try again


    I deleted everything except for the page with the combo boxes and the code for reading them. They are on Sheet2 (Charts).

    The VBA password is abc123. If you step through the subs ComboBox1_Change(), you will see that it doesn't recognize ComboBox1.Value as an object. Everything else is stripped out, so nothing else works. If I can get it to read ComboBox1.Value even in a watch, then this would be a success.
    Attached Files Attached Files

  6. #6
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,645
    Don't post files with any kind of 'protection'.

    Sub M_snb()
       MsgBox Sheet2.OLEObjects.Count
       MsgBox Sheet2.DropDowns.Count
    End Sub
    Your file doesn't contain any ActiveX-controls, nor formfieldcontrols.
    It only contains 4 pictures ( .copypicture) of a combobox or dropdown.
    Last edited by snb; 06-09-2020 at 03:58 AM.

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    I deleted and then re-added the ComboBoxes


    I can't compile since the subs are not there, but I get a different message and the comboboxes seem to work like comboboxes should

    Capture.JPG
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •