+ Reply to Thread
Results 1 to 6 of 6

Error Message: Compile Error: Method or data Member not found

  1. #1
    Registered User
    Join Date
    01-19-2017
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    6

    Error Message: Compile Error: Method or data Member not found

    Hi,

    I currently creating a VBA in excel and one of the forms I am using has 2 option button (for Yes and No option) to determine which form to load once i click an image (named Next) however I am getting the error "Compile Error: Method or data Member not found". Below is the code i used:
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 01-21-2017 at 02:49 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Error Message: Compile Error: Method or data Member not found

    Hello blei ,

    First problem is you are using the keyword Selection. You cannot redefine VBA keywords in a Sub or Function procedure. Secondly, Sheet1.Range("E2:E3").Value will return a 2-D array of values an not a single integer.

    I don't see the need to check the worksheet values since you are referencing the Buttons directly. What is the purpose of the cell references?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Error Message: Compile Error: Method or data Member not found

    Hello blei ,

    First problem is you are using the keyword Selection. You cannot redefine VBA keywords in a Sub or Function procedure. Secondly, Sheet1.Range("E2:E3").Value will return a 2-D array of values an not a single integer.

    I don't see the need to check the worksheet values since you are referencing the Buttons directly. What is the purpose of the cell references?

  4. #4
    Registered User
    Join Date
    01-19-2017
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    6

    Re: Error Message: Compile Error: Method or data Member not found

    I use cell references when using option button to determine which option i have selected and would lead me to the next screen. What would you recommend for me to have this working?

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Error Message: Compile Error: Method or data Member not found

    Hello blei,

    I assume you are using Forms buttons on the worksheet, correct?

  6. #6
    Registered User
    Join Date
    01-19-2017
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    6

    Re: Error Message: Compile Error: Method or data Member not found

    Hi Leith,

    I am actually using the forms in VBA though I am using cells in the worksheet as reference for the option buttons.

+ 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: Method or data member not Found
    By jasond1992 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2015, 02:29 AM
  2. [SOLVED] Compile error: Method or data member not found
    By aliciaward1001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-26-2015, 04:11 PM
  3. Compile error:Method or data member not found
    By vshukla in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2015, 11:44 AM
  4. Compile error method or data member not found
    By sureshpunna in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2014, 09:00 AM
  5. Compile Error Method or data member not found
    By ixelister in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-23-2014, 03:39 PM
  6. [SOLVED] Compile error: Method or data member not found.
    By ndtsteve in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-10-2012, 11:31 AM
  7. Compile Error Method or data member not found
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2005, 06:05 PM

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