+ Reply to Thread
Results 1 to 3 of 3

Dynamic UserFrom creation

  1. #1
    Registered User
    Join Date
    09-12-2021
    Location
    Germany
    MS-Off Ver
    MS Office 365
    Posts
    2

    Question Dynamic UserFrom creation

    Hello everyone,

    I have a potential simple question but I struggle to go ahead here.
    I'm trying to create a dynamic amount of UserForm which have the same design with the same functionality.
    The first step - creating the user form is done as well as transferring code into e.g. "CommandButton1_Click()"

    Now I want that whenever I click this button a value within this UserForm is stored in a specific sheet.

    Within the CommandButton1_Click() I Make a

    Call Insert(Me.Name)

    The Insert Sub looks like this:

    Sub Insert (Name as String)
    Dim TextInsert as String

    TextInsert = Name.TextBox1.Value


    But this always causes a compile error "Invalid qualifier"

    I guess the solution is rather simple - many thanks in advance and best regards,

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,305

    Re: Dynamic UserFrom creation

    There is no need to trigger another Sub in a simple case as this - put the code in the command button event.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Registered User
    Join Date
    09-12-2021
    Location
    Germany
    MS-Off Ver
    MS Office 365
    Posts
    2

    Re: Dynamic UserFrom creation

    Thanks but this code is dynamically created as well as the Userform. Therefore, my idea was to not blow up the code of the dynamic Userform creation to just call those subs here

+ 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. VBA Dynamic ComboBoxs to be added to an Excel UserFrom
    By Shlomi.unique in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2016, 08:59 AM
  2. [SOLVED] dynamic creation of CheckBox1_Click() sub
    By iwannabakat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2014, 03:37 AM
  3. Dynamic Box Creation
    By Tayjayt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2013, 04:03 AM
  4. Dynamic URL creation
    By atheo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2010, 11:50 PM
  5. dynamic range name creation
    By bstubbs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-20-2009, 03:59 PM
  6. Dynamic Link Creation...
    By JaedenRuiner in forum Excel General
    Replies: 1
    Last Post: 01-15-2009, 07:02 PM
  7. Dynamic Row Creation
    By mwagon73 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2007, 12:16 PM

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