+ Reply to Thread
Results 1 to 8 of 8

Method or data member not found

  1. #1
    Registered User
    Join Date
    04-30-2021
    Location
    Brazil
    MS-Off Ver
    2019
    Posts
    13

    Method or data member not found

    Hello everyone!

    I am using some ActiveX ComboBox on my sheets to filter some information. It was working fine, but out of the blue an error occurred and I received the bellow message:

    Compile error: Method or data member not found


    And then my ComboBoxes aren't recognized anymore...

    The code that I used was this:

    Please Login or Register  to view this content.
    Any idea why this error occurred? =\
    Last edited by 6StringJazzer; 09-09-2022 at 10:33 AM. Reason: please use code tags

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 2209 64-bit
    Posts
    21,675

    Re: Method or data member not found

    Which line of code causes the error? When this compiler error occurs, it will highlight in blue the exact thing that it can't find.

    This suggests that Sheet2 does not actually have a combobox named ComboBox1 (or whatever line is causing the error). (I didn't have a Sheet2 so I used Sheet14, which has no ComboBoxes.)

    methodnotfound.JPG

    Also, you only showed a few lines of code so I don't want to make too big a deal out of this BUT:

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I have edited your post to add code tags because you only have 11 posts.
    Jeff
    | | |?| |?| |?| |?| | |:| | |?| |?|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    04-30-2021
    Location
    Brazil
    MS-Off Ver
    2019
    Posts
    13

    Re: Method or data member not found

    Hi! Thanks for the welcome and explanations. Ok! I will stay tuned about adding the code properly.
    Yes, the thing is that suddenly my Comboboxes were not read anymore by Excel as Comboboxes. I would like to understand what I can do in order to avoid this kind of error, where suddenly an error happens and my Comboboxes aren't read anymore (write the code differently, for example)
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    900

    Re: Method or data member not found

    Make sure you use ActiveX controls.

    I only see pictures
    Last edited by JEC.; 09-09-2022 at 11:59 AM.

  5. #5
    Forum Expert
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    3,721

    Re: Method or data member not found

    Strange ??? - Have you copied and pasted the page as the comboboxes have retained their names but appear to be images (pictures) ?????
    I have just deleted then re-inserted and they work OK (note each sheet will contain a name ComboBox1 - the sheet prefix will determine which is referenced).
    As a cautionary note, always have your control totally contained within cell boundaries - it prevents them losing their location and wandering randomly around the sheet.

    @JEC - are you sure ?
    You can not use the .List property. Use this instead
    Attached Files Attached Files
    Last edited by torachan; 09-09-2022 at 12:02 PM.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  6. #6
    Registered User
    Join Date
    04-30-2021
    Location
    Brazil
    MS-Off Ver
    2019
    Posts
    13

    Re: Method or data member not found

    Yes, that's exactly what happened, my Comboboxes transformed into pictures and lost their ActiveX property. And I just don't know why. =\
    I usually use a lot of heavy Excel files and I think maybe with more than one file open an error has happened when processing, I don't know...
    This kind of error already happened to me once before and I just add new Comboboxes. I will do this again, but thanks again, everyone! I really appreciate your kind attention

  7. #7
    Valued Forum Contributor
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    900

    Re: Method or data member not found

    No I mixed something up

  8. #8
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 2209 64-bit
    Posts
    21,675

    Re: Method or data member not found

    Quote Originally Posted by BiaMidori View Post
    ...my Comboboxes transformed into pictures and lost their ActiveX property.
    I have had this happen once or twice. I assumed it was a random file corruption and never figured out the root cause.

+ 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: Method or data member not found
    By Ashay Kalkote in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-28-2022, 05:13 AM
  2. Method or Data Member Not Found
    By adbrad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2016, 09:05 AM
  3. Method or data member not found
    By Rob K in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-27-2015, 03:50 PM
  4. [SOLVED] Error: Method or Data Member Not Found
    By k64 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-21-2015, 08:39 AM
  5. Method or data member not found
    By katieshields in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-02-2014, 08:49 AM
  6. [SOLVED] error: Method or Data Member not found
    By CRIMEDOG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2013, 11:01 AM
  7. Method or Data Member not Found
    By Syed Haider Ali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2005, 09:27 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