Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default UserForm implementation

Hi,

Sorry for this elementary question, but I'm mostly new to Excel programming.
I'd like to know how UserForms are called from within a spreadsheet. For
example, in the VBA editor I inserted a UserForm (named UserForm1) and added
a bunch of controls together with their corresponding "Private Subs" and the
Visual Basic code that performs the intended tasks with data from the
spreadsheet.
I test the Private Subs (or UserForm1 better said) with F5 and everything is
OK, however the end user of the spreadsheet isn't supposed to need to jump
to the VBA editor and hit F5 to work with the UserForm, so I'd like to know
how the UserForm is displayed with or linked to (I don't know how this is
called actually) the spreadsheet so that he/she interacts with it in the
same fashion as with controls bound to ordinary macros that get displayed
*with* the spreadsheet. I devoted some time to browsing both Excel's and VBA
editor's menus and on-line help but couldn't figure out how this is
achieved.

Thank you,

Fernando Ronci
E-mail:


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default UserForm implementation

Once you've created a userform, create a macro to display it.
E.g.,

Sub DisplayForm()
Userform1.Show
End Sub

Then, the user can execute this macro directly (ALT+F8 or Tools
menu, Macros, Macros) or you can create a command bar button or
menu item and assign the above macro to that control.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Fernando Ronci" wrote in message
...
Hi,

Sorry for this elementary question, but I'm mostly new to Excel

programming.
I'd like to know how UserForms are called from within a

spreadsheet. For
example, in the VBA editor I inserted a UserForm (named

UserForm1) and added
a bunch of controls together with their corresponding "Private

Subs" and the
Visual Basic code that performs the intended tasks with data

from the
spreadsheet.
I test the Private Subs (or UserForm1 better said) with F5 and

everything is
OK, however the end user of the spreadsheet isn't supposed to

need to jump
to the VBA editor and hit F5 to work with the UserForm, so I'd

like to know
how the UserForm is displayed with or linked to (I don't know

how this is
called actually) the spreadsheet so that he/she interacts with

it in the
same fashion as with controls bound to ordinary macros that get

displayed
*with* the spreadsheet. I devoted some time to browsing both

Excel's and VBA
editor's menus and on-line help but couldn't figure out how

this is
achieved.

Thank you,

Fernando Ronci
E-mail:




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
Excel functions implementation history gecs Excel Discussion (Misc queries) 3 October 1st 09 08:25 AM
Functions implementation history gecs Excel Discussion (Misc queries) 0 August 18th 09 07:13 PM
Userform Jeff Excel Discussion (Misc queries) 0 February 6th 06 09:30 PM
Userform inside another userform Ryan Excel Programming 0 April 23rd 04 08:01 PM
UserForm help Michael[_13_] Excel Programming 4 September 19th 03 03:40 PM


All times are GMT +1. The time now is 06:30 AM.

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

About Us

"It's about Microsoft Excel"