Link to home
Start Free TrialLog in
Avatar of bjfulkerson
bjfulkerson

asked on

UserForm activated by a Button in a workbook

I have a working user form.  I want to create a button on the HOME sheet of my workbook to click to launch the User Form
Avatar of Norie
Norie

That's straightforward, goto the Home sheet, then goto the Developer tab and in the Controls section click Insert.

Now choose either a Forms command button or a ActiveX comman button and place it wherever you want on the sheet.

If you picked a Forms control you should automatically see the Macros dialog box.

Just click New and you should then see something like this.
Sub Button2_Click()

End Sub

Open in new window

This is where the code goes to open the userform, and here's the code.
TimeSheetEntry.Show

Open in new window

After adding that code this is what you should have.
Sub Button2_Click()
    TimeSheetEntry.Show ' open userform
End Sub

Open in new window


If you added an ActiveX button double click the button.

You should then see something like this, and this is where the code to open the form should go.
Private Sub CommandButton1_Click()
    TimeSheetEntry.Show ' open userform
End Sub

Open in new window

Avatar of bjfulkerson

ASKER

I have what you said but it wont open the userform.
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You left a box in the upper left of the home page.  It crashes when I try to delete.

Do you know anything about adding a pop up calendar so I can select a date in the past or future?
How do I use the ADD, UPDATE  and Delete
It depends what you want to do with them really, which at the moment I don't know.:)

PS That 'box' was in the original file you uploaded.
What I want to do is "add" the information added to the worksheet form (next available ROW.

Eventually I will want to duplicate this button to update employee information and update codes.
Add what information where?

The userform has various other textboxes that don't seem to match to anything on the employee sheet.
I will have to get back in the morning.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.