Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel functions implementation history | Excel Discussion (Misc queries) | |||
Functions implementation history | Excel Discussion (Misc queries) | |||
Userform | Excel Discussion (Misc queries) | |||
Userform inside another userform | Excel Programming | |||
UserForm help | Excel Programming |