user441978
user441978

Reputation: 851

How to bring the userform in the excel sheet?

I have developed an UserForm VBA module.

But i want that userform when opening the excel sheet itself? WheN I open the UserForm should should show.

Upvotes: 1

Views: 12408

Answers (2)

brettdj
brettdj

Reputation: 55682

To hide the Excel Application but show a UserFrom you could use this in the ThisWorkbook module

Private Sub Workbook_Open()
Application.WindowState = xlMinimized
UserForm1.Show vbModeless
End Sub

Upvotes: 3

Daniel
Daniel

Reputation: 13122

To open when you open the workbook in the ThisWorkbook Module:

Private Sub Workbook_Open()
    Userform1.Show
End Sub

Replace UserForm1 with the name of the Userform, if different.

To open when you enter a particular sheet in the sheet Module:

Private Sub Worksheet_Activate()
    UserForm1.Show
End Sub

Upvotes: 1

Related Questions