![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Arkansas
Posts: 358
|
New at vbs, can anyone tell me how, after writing a form in visual, to attach it to a click button in excel where it will pull the form up. Thx Dan
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Right click on the name tab of the worksheet that contains the button, choose "View Code". In the VB editor that comes up you will see two drop-down menus, one will say "(General)" and the other will say ")Declarations"). Click on the arrow for the "(General)" box, and you should see the name of your button in that list. Select that button. You will now see some code in the window that says something like:
Put your code to show the userform in here. e.g. if your userform is called "UserForm1" then you put this line of code in to show the userform:
Go back to your work book and hopefully if you click your button the userform will show. If nothing happens that check the toolbar called "Control Toolbox" and make sure that the "Design Mode" button hasn't been pressed. HTH |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Arkansas
Posts: 358
|
Thanks Mark works great, so simple but I could not figure it out. Thanks again.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|