User Form - how to load it

B

Balan

I have developed a user form. How to ensure that it gets loaded when ever I
open the workbook ?
 
C

Chip Pearson

In the ThisWorkbook code module, use something like

Private Sub Workbook_Open()
UserForm1.Show
End Sub


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
B

Balan

Many thanks !

Chip Pearson said:
In the ThisWorkbook code module, use something like

Private Sub Workbook_Open()
UserForm1.Show
End Sub


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
B

Balan

Sorry trouble you again. I am getting error msg 424 " Object Required" when
ever I tried to open the workbook. I tried to check the name of the
workbook, spelling used in Private Sub Workbook_Open(). I am not able to
trace the problem. What could be the reason, please ?

Balan
 
D

Dave Peterson

Did you change the name of the Userform? If you did, then you'll have to use
its new name in your code, too.

If this doesn't help, what's the name of the userform?

And post the code that causes the error--maybe it's not the Workbook_Open
event???
 
Top