Just use UserForm1.Show. You can refer to the controls on the userform, from outside it's module, by prefacing the control name with the userform name eg: -
UserForm1.TextBox1.Text = ""
'Sup?
How can I open the UserForm code module by macro. Like when I use VBA to open some regular macro, you know with 'Application.Goto Reference:="the name of the Sub"'. This doesn't work if the Sub is in the UserForm. How should I name the Reference? Any ideas?
Just use UserForm1.Show. You can refer to the controls on the userform, from outside it's module, by prefacing the control name with the userform name eg: -
UserForm1.TextBox1.Text = ""
How would I exactly use UserForm.Show? I don't want to show the UserForm, I want to open the UserForm code window in VBE by VBA. Understand? To open the Sub something() in the editor by macro and the Sub something is on the UserForm.On 2002-03-19 12:18, Mudface wrote:
Just use UserForm1.Show. You can refer to the controls on the userform, from outside it's module, by prefacing the control name with the userform name eg: -
UserForm1.TextBox1.Text = ""
Anyone? Please! Mudface? Cum on man, let me have it...
Is this really this hard? Cum on guys! Be a punch of pals and give it to me!
Any of you new guys got an idea?
UserForm1.Show has already been the exact VBA code to show a userform.
You can try.
A form is a class module...
The answer given seems to be right
Use this syntax
frmYourForm.Sub_Name
This will load the form into memory but will
not show it
Just to clarify dude.
You have a form called frmDude
Contained within the forms code you have a sub called...
Sub RunThisSub
'code
End Sub
To access this sub outside of the actual running form use this syntax
frmDude.RunThisSub
As I said before, this will load the form into memory but will not show it.
Like this thread? Share it with others