+ Reply to Thread
Results 1 to 6 of 6

Populate TextBox from Module prior to opening TextBox

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Populate TextBox from Module prior to opening TextBox

    OK. I concede defeat. It's your turn if you have "THE STUFF" I clearly don't have. This code works roughly 70% of the time in populating TextBox 1-20. (for the record, I need a perfect 100% of the time. I'm just picky that way; LOL).
    Essentially what I am doing is this (pertinent Facts):

    1. Userform (TextBox only) is populated prior to opening in order to have a TextBox that the end user can manipulate should the need arise.
    2. It is populated (code below) in a module that is activated via a macro button on excel sheet (duh).

    Any help greatly appreciated as I am exhausted working on this one. Seemed simple enough when I wrote it and the first few times it worked fine. Now that the end is near and I was testing all code, I tried it again and saw the flaw after several attempts.

    Please Login or Register  to view this content.

  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,258

    Re: Populate TextBox from Module prior to opening TextBox

    Hello Dabbler39,

    Posting your workbook is the quickest way to get answer to your problem. People are not inclined to recreate your work just to test it.
    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
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: Populate TextBox from Module prior to opening TextBox

    I have attached the workbook for review as per request.

    Thank you.
    Attached Files Attached Files

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

    Re: Populate TextBox from Module prior to opening TextBox

    Hello Dabbler39,

    Thanks for the workbook. I must admit I too am overwhelmed. There is a lot of code and a lot of data and so far I can't match anything up. You will have to point me in the right direction.

    Which user form are you referring to in your first post?
    Do I need to create a copy of the template sheet to check out the code?

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: Populate TextBox from Module prior to opening TextBox

    Leith. Thanks for the reply. Sorry for late response, I became deathly ill for roughly 24 hours. I lived!
    Okay, here goes:
    On the "Template" SHEET, the user pushes the "CONTACT INFO" (BLUE) button that takes you to the "ContactInfo" Userform. That is where the problem is. The code that takes you to the userform "ContactInfo" and populates it is in module 1 at the top which is where I believe the problem lies (code listed above). Now, what's more interesting, is........I am at work again, and alive, and tried it on my work computer and can't get it to fail. Curious to see if it fails for you.

    The failure is that it doesn't always populate the "ContactInfo" userform. Sometimes it is blank when the "button is pushed." The code appears accurate to me. Just so you know........it is pulling the info to populate the userform from roughly BA1 where it is orange.

    What I have done is this: by populating the textboxes in the userform when opening, the textboxes remain usable (as in, the end user can change them). When it is closed it changes the cells on the spreadsheet to match user input. All good, except on my HOME computer only now apparently, it doesn't populate the userform when opening it everytime. If it's working for you, there is an issue with my excel at home. Which is interesting as both versions are 2010. AHHHHHHHHHHHH.

  6. #6
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: Populate TextBox from Module prior to opening TextBox

    Leith Ross,

    Sorry for not answering your questions adequately.

    Ultimately, yes, the template will be copied repeatedly as it is just a template. However, for testing purposes, it can be used as the guinea pig. Just click on the "Contact Info" button on the top to pull up the ContactInfo userform. There may be nothing in it on the first try. Just fill out the top left 12 boxes with jibborish if they are empty.

    Thanks again for your efforts.

    Dabbler

+ 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. Pass values from UserForm ListBox/ TextBox to run the codes of a Module
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-05-2011, 08:59 AM
  2. to refer to a textbox from a module
    By kmlprtsngh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2010, 03:05 AM
  3. Populate Textbox
    By billykiller05 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2010, 11:52 AM
  4. Textbox Hyperlink opens VB Editor at Specific Module
    By Neily in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-26-2005, 08:05 AM
  5. Default in a textbox and change a module name
    By filo666 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2005, 04:06 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