Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Having a userform open upon opening the program

Posted on 2006-04-10
3
Medium Priority
?
215 Views
Last Modified: 2010-04-17
Hi,

I created a userform in Excel VBA, but don't know how to get it to open when the program opens. Do I add some code to ThisWorkbook, or to Sheet1?

Hope you can help.

Mike
0
Comment
Question by:Mike_DM
3 Comments
 
LVL 1

Accepted Solution

by:
ghunt_03 earned 400 total points
ID: 16423974
If you put the following code in the same module as any macros it should automatically open the form when the workbook opens


Sub Auto_Open()
  userform1.Show
End Sub
0
 
LVL 2

Expert Comment

by:borislavmarkov
ID: 16424381
Private Sub  App_WorkbookOpen(ByVal Wb As Workbook)
    Application.Windows.Arrange xlArrangeStyleTiled
End Sub
0
 

Expert Comment

by:mikeydm
ID: 16426854
Hi, the first (and simpler) code worked, and the second didn't. However, I had to put the code in a new module -- the rest of the code sits in the userform object.

Mike
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Starting up a Project
Screencast - Getting to Know the Pipeline

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question