+ Reply to Thread
Results 1 to 4 of 4

Won't accept textbox3

  1. #1
    davegb
    Guest

    Won't accept textbox3

    I'm using a userform to input data. When I put this line in my code:

    sFacilName = TextBox3.Text

    It keeps telling me TextBox3 is undefined. But it is in the userform. I
    can't find any "definition" of Textbox1 in Walkenbach's example of a
    userform. I also tried it with the other textbox in the form, doesn't
    recognize that one either. So what is different about my code that it
    doesn't recognize the controls in it?

    Thanks.


  2. #2

    Re: Won't accept textbox3

    where is your code - if it is on the userform, then it should be OK,
    but if it is in a module outside of the code then you would need
    userform1.textbox3.text

    this may be one of those cases where it is useful to see the form so if
    that DOESN'T resolve it my email is as my posting name!

    davegb wrote:
    > I'm using a userform to input data. When I put this line in my code:
    >
    > sFacilName = TextBox3.Text
    >
    > It keeps telling me TextBox3 is undefined. But it is in the userform. I
    > can't find any "definition" of Textbox1 in Walkenbach's example of a
    > userform. I also tried it with the other textbox in the form, doesn't
    > recognize that one either. So what is different about my code that it
    > doesn't recognize the controls in it?
    >
    > Thanks.



  3. #3
    Registered User
    Join Date
    02-13-2006
    Posts
    46
    Hi Dave,
    Your code is correct. Check once more whether textboz3 exists or not.
    Otherwise delete the textboz and recreate it. Hope it will solve the problem.
    Regards,
    Ashish

  4. #4
    davegb
    Guest

    Re: Won't accept textbox3

    Thanks to both of you. Finally got it working. I had to delete and
    recreate both textboxes to get them to work. Don't understand why. Very
    frustrating!

    ashishprem wrote:
    > Hi Dave,
    > Your code is correct. Check once more whether textboz3 exists or not.
    > Otherwise delete the textboz and recreate it. Hope it will solve the
    > problem.
    > Regards,
    > Ashish
    >
    >
    > --
    > ashishprem
    > ------------------------------------------------------------------------
    > ashishprem's Profile: http://www.excelforum.com/member.php...o&userid=31485
    > View this thread: http://www.excelforum.com/showthread...hreadid=550378



+ 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