![]() |
![]() |
|
|||||||
| 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: May 2002
Location: Manchester, England
Posts: 73
|
Hi,
Can anyone tell me how I embed the 'UserForm1' that I've created into my spreadsheet (sheet1)? Currently to use it i have to go into Visual Basic and 'Run Userform'... Cheers By the way, I'm still quite new to this VB malarkey |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
You could put: Userform1.show Into your Worksheet Activate event, or have a button on the sheet with the same code on it |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Greenwood, SC
Posts: 677
|
Not sure exactly what you mean by embed, but I'll give it a shot.
If what you want is the form to open when the workbook is opened, it's pretty easy. In the VB editor, double-click This Workbook from the project pane. Type the following: Private Sub Workbook_Open UserForm1.Show End Sub This will open the userform whenever the worksheet is opened. Check the Excel help files for Event Procedures (since that is what you are using) for more details. If this is not what you meant, please clarify and I'll try again... K |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: May 2002
Location: Manchester, England
Posts: 73
|
Cheers mate - it works a treat!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|