VBA, can a new, standard userform be created via code? -


After the launch of my VBA program, I would like to be able to form a form, is it possible?

I have the search stack overflow and on the web and can not find a definitive answer. If this can be done, then I have not received the code to do this.

I'm just looking for some basic, generic codes, if this is possible.

Normally you can do whatever you can, although you have left too many details So it's hard to say

Forms are like any other class, so it is possible to instantinate many of them.

  PublicForm1ForForm1 u.Show False '& lt; UserForm1 set as U Diff U for the integer I = 1 to 3 as the public sub CreateForms () Dim I - Set the modal to false so that the new form will not block the loop. Next I end sub  

make it three copies of the same form.

Edit

After reviewing Tim's comment, I dropped the User Form 1 as the U.U = new User 1 Dame T as MSForms.CommandButton load U Set u with t = u Control. Add ("Forms.CommandButton.1", "cmdbutton1", is true) with T. Caption = "dynamic button". Left = 10 Heat = 300 with top = 10 end Width = 600 .Composition = "Dynamic form". Ending with the show

It looks like you already have a blank form, but you can be a bit easier to serve as the basis of any form Are there.

More info:


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -