ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Link to User form (https://www.excelbanter.com/excel-programming/289816-link-user-form.html)

gregork

Link to User form
 
I have a button on a user form that I want to command another user form to
open. How do I do this using VBA code?

gregork



Hank Scorpio

Link to User form
 
On Sat, 31 Jan 2004 23:00:59 +1300, "gregork"
wrote:

I have a button on a user form that I want to command another user form to
open. How do I do this using VBA code?


You want a second user form to open a button??

I'm guessing that you actually mean that you want a command button on
one user form to open a second user form. (If that's not it, please
post again with more details.)

You can do that by simply entering the following code. (CommandButton1
is on a form called UserForm1, and UserForm2 is the form that is to be
opened.)

Private Sub CommandButton1_Click()

UserForm2.Show

End Sub


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *

gregork

Link to User form
 
Yes Hank that was exactly what I meant.

Many thanks.
gregork

"Hank Scorpio" wrote in message
...
On Sat, 31 Jan 2004 23:00:59 +1300, "gregork"
wrote:

I have a button on a user form that I want to command another user form

to
open. How do I do this using VBA code?


You want a second user form to open a button??

I'm guessing that you actually mean that you want a command button on
one user form to open a second user form. (If that's not it, please
post again with more details.)

You can do that by simply entering the following code. (CommandButton1
is on a form called UserForm1, and UserForm2 is the form that is to be
opened.)

Private Sub CommandButton1_Click()

UserForm2.Show

End Sub


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *





All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com