+ Reply to Thread
Results 1 to 7 of 7

"Me.Controls" giving error Could not find the specified object.

  1. #1
    Registered User
    Join Date
    09-01-2011
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    9

    "Me.Controls" giving error Could not find the specified object.

    Hi,

    I'm trying to loop through textboxes and checkboxes.

    It works fine for the checkboxes... but I get an error saying "Could not find the specified object" for the line that relates to textboxes.

    heres the code:

    Please Login or Register  to view this content.
    I used it here too and it works fine: (vcheck is a boolean variable)

    Please Login or Register  to view this content.
    I matched the stuff inside the brackets of the function to what was in the "name" field for the textboxes.

    Also, using the code:
    Please Login or Register  to view this content.
    .... etc. works fine.

    Any help?
    Last edited by Abdulwahab; 09-01-2011 at 01:35 PM. Reason: added code tags

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    1,252

    re: "Me.Controls" giving error Could not find the specified object.

    Welcome to the forum, Abdul.

    Please can you edit your first post and put code tags around your code? To see how, have a look in my signature.

    That certainly looks like a strange error. I think the quickest way to solve this problem would be if you attached an example workbook to the thread?
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Registered User
    Join Date
    09-01-2011
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    9

    re: "Me.Controls" giving error Could not find the specified object.

    Thanks for the warm welcome.

    I went ahead and made the changes to my first post.

    So I made an example workbook, and am attaching the actual workbook I was having problems with as well.

    I demonstrated in the example workbook the area that I am having trouble with (though it works perfectly fine in the example workbook). Cycling through the textboxes in the second workbook that I'm attaching is giving me problems.
    Attached Files Attached Files

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    re: "Me.Controls" giving error Could not find the specified object.

    You don't have a sheet called Sheet1 so that's the first problem

    This works
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    09-01-2011
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    9

    re: "Me.Controls" giving error Could not find the specified object.

    "Sheet1" was in the workbook "Book1" that I gave as an example.

    I'm pretty sure the "iets-support-checklist" workbook's variables point to "Checklist"

  6. #6
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    1,252

    re: "Me.Controls" giving error Could not find the specified object.

    It errors when i=5 because in your userform you've missed txtBox5 out. The control sequence goes:

    txtBox1
    txtBox2
    txtBox3
    txtBox4
    txtBox6
    txtBox7
    txtBox8
    txtBox9
    txtBox10
    txtBox11
    txtBox12
    txtBox13

    So it will error if i>13 too.

  7. #7
    Registered User
    Join Date
    09-01-2011
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    9

    re: "Me.Controls" giving error Could not find the specified object.

    argh. Thank you so much. I'd been trying to figure this out for a while now.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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