Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Forms Joanne New Users to Excel 18 July 5th 07 12:42 AM
user forms Obi-Wan Kenobi Excel Discussion (Misc queries) 0 March 21st 06 08:28 PM
user forms Runner77 Excel Discussion (Misc queries) 0 January 12th 06 04:31 AM
User forms in VBA Dick Kusleika Excel Programming 0 September 29th 03 05:55 PM
User forms Candee[_2_] Excel Programming 2 September 12th 03 03:11 PM


All times are GMT +1. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"