+ Reply to Thread
Results 1 to 3 of 3

Userform - Cannot transfer value of textbox to range when created dynamically

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    104

    Userform - Cannot transfer value of textbox to range when created dynamically

    Hello,

    I able to transfer values from textboxes already created on a userform but I am struggling on transferring the values of textboxes that are created dynamically when the userform is loaded.

    Attached is a sample workbook. Textbox1 and Textbox2 where already created on the userform but TxBx_E1_01, TxBx_E1_02 and TxBx_E1_03 are created dynamically when the userform is loaded.

    When I load the form and populated all the textboxes and I click on the commandbutton, it runs the following macro to save values to the worksheet
    Please Login or Register  to view this content.
    I get the following error on the first line of the dynamically created textboxes: Run-time error 424: object required

    I try to search the web but could find the answer to this. Thank you for your time!
    Attached Files Attached Files

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Userform - Cannot transfer value of textbox to range when created dynamically

    Hi,

    Try referring to the textboxes through the controls collection by name thus
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    104

    Re: Userform - Cannot transfer value of textbox to range when created dynamically

    Thank you for your quick response. That worked! Will mark as solved, have a nice day!

+ 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. place dynamically created controls in row and column into the userform with in the frame
    By gokulkrishi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2016, 01:38 AM
  2. [SOLVED] Update individual cell on excel based upon userform textbox dynamically
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2016, 05:58 AM
  3. [SOLVED] Search as you type in a textbox: need to filter Dynamically created checkboxes)
    By yoursamrit2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2015, 08:52 PM
  4. Replies: 0
    Last Post: 06-22-2014, 04:18 PM
  5. [SOLVED] Adding change event to dynamically created option buttons on userform
    By Arkadi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2014, 11:38 AM
  6. [SOLVED] userForm -> Frame 'top' value limited. Dynamically created controls,
    By kropeck in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 08-19-2013, 09:04 AM
  7. Assigning macros to a dynamically created userform
    By moosemaster23 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 04-19-2013, 07:42 AM

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