Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB user forms
Hi all,
I started to play with user forms in visual basic. One thing lead to another and with overwhelming excitement I created my first form. Having spent all that time I cannot now fathom out how to launch that form whilst in the excel spread sheet. I assume that one way would be through a macro button. Does anyone know the macro code that would be needed to launch a selected user form. Thanks for any available help or helpful links that I have failed to find -- Mad |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB user forms
If I understand you well, it is very simple. Just put the followin
macro in your vba-module and replace FormName for the name of you form. Sub OpenForm() FormName.Show End Sub You can add the macro to a button or menu -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB user forms
On Sun, 11 Jan 2004 15:30:51 -0600, polletje wrote:
If I understand you well, it is very simple. Just put the following macro in your vba-module and replace FormName for the name of your form. Sub OpenForm() FormName.Show End Sub I think you understand me polletje. Thanks for the reply. When I create a macro button and view code I see the following Private Sub CommandButton1_Click() End Sub With the curser in between the two commands. I have played with your lines but I can't get it to work. I'm sure it's simple and if I could learn to walk before I ran I would avoid these situations. Any further help would be appreciated. -- Mad |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB user forms
You should use Show method of a user form like this:
Private Sub CommandButton1_Click() UserForm1.Show End Sub "Madasu" wrote in message ... On Sun, 11 Jan 2004 15:30:51 -0600, polletje wrote: If I understand you well, it is very simple. Just put the following macro in your vba-module and replace FormName for the name of your form. Sub OpenForm() FormName.Show End Sub I think you understand me polletje. Thanks for the reply. When I create a macro button and view code I see the following Private Sub CommandButton1_Click() End Sub With the curser in between the two commands. I have played with your lines but I can't get it to work. I'm sure it's simple and if I could learn to walk before I ran I would avoid these situations. Any further help would be appreciated. -- Mad |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB user forms
On Sun, 11 Jan 2004 23:33:04 +0100, Yakimo wrote:
You should use Show method of a user form like this: Private Sub CommandButton1_Click() UserForm1.Show End Sub Thanks Yakimo. That did the trick. -- Mad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Forms | New Users to Excel | |||
user forms | Excel Discussion (Misc queries) | |||
user forms | Excel Discussion (Misc queries) | |||
User forms in VBA | Excel Programming | |||
User forms | Excel Programming |