+ Reply to Thread
Results 1 to 2 of 2

Compile Error:Method or Data Member Not Found

  1. #1
    Registered User
    Join Date
    07-31-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    16

    Compile Error:Method or Data Member Not Found

    Hi All,
    I have three combo boxes in Sheet7. The moment I open the Workbook, the following error pops up;
    "Compile Error:
    Method or Data Member Not Found"

    I have used the following codes to run the combo boxes.
    PHP Code: 
    Private Sub ComboBox1_Change()
        
    Me.ComboBox2.Clear
        Me
    .ComboBox3.Clear
        
    If Me.ComboBox1.Text vbNullString Then Exit Sub
        Dim ListCell 
    As Range
        
    For Each ListCell In Sheet1.Range(Me.ComboBox1.List(Me.ComboBox1.ListIndex))
        
    Me.ComboBox2.AddItem (ListCell.Value)
        
    Next ListCell
        End Sub
    Private Sub ComboBox2_Change()
        
    Me.ComboBox3.Clear
        Dim ListCell 
    As Range
        
    If Me.ComboBox2.Text vbNullString Then Exit Sub
        
    For Each ListCell In Sheet1.Range(Me.ComboBox2.List(Me.ComboBox2.ListIndex))
        
    Me.ComboBox3.AddItem (ListCell.Value)
        
    Next ListCell
        End Sub 
    How do I get rid of this error message.
    Thanks
    Lok

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Compile Error:Method or Data Member Not Found

    Just a stab in the dark. What line are you getting it on? It looks like you are not referring to the sheet name correctly.

    See if this works?

    Please Login or Register  to view this content.
    Or,

    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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